Page 1 of 1

BMP

Posted: Tue May 23, 2006 2:42 pm
by TK
I need help :(

I need to display a bitmap using only interupts ( thats right, no direct video memory access ) from c, but using just the standard bios interupts. Its mode 0x13. Any help would be appreciated.

Re:BMP

Posted: Tue May 23, 2006 2:52 pm
by elderK
Just write something to load the BMP structure, then blit the bitmap pixel by pixel using BIOS Video Interrupts.

A good guide on how to read Bitmaps is here:
http://www.brackeen.com/home/vga/bitmaps.html

:) hope it helps!

Re:BMP

Posted: Wed May 24, 2006 5:26 am
by Pype.Clicker
there might be a "plot pixel" BIOS function ... Check the RBIL to find out (int 10h, function 0C, most likely).

Yet i fail to see why you want so hard to avoid direct accesses to 0xA0000 ... that's from far the fastest way, as well as the simplest. And from C !?

Any chance you're having a programming assignment ?

Re:BMP

Posted: Wed May 24, 2006 6:03 am
by distantvoices
Yeah, it smells like such a thing.

@TK: There might be dozens of ressources about how to draw a bmp, but then, provided the truth of our assumption that you 're asking because of any kind of assignment, you might get a hard time when it comes down to being interrogated by the prof and not knowing how and why you do it this and not any other way ... by writing directly, you can argue: it is simpler to write, it is faster, it is easier to maintain and way easier to extend ... and thus knocking off any of his reprimands.

Re:BMP

Posted: Wed May 24, 2006 2:16 pm
by Tk
Rofl, its for the heck of it, just cause i can.

@azeii - Ive seen that one before, i know how to do it that way. I WANT TO DO IT BY INTERUPTS! So many people know memory access is faster, so they always show examples and explanations for that. I want to do interupts simply becuase its not documented.

Re:BMP

Posted: Wed May 24, 2006 2:57 pm
by mystran
Last I check RBIL documented it quite well. Check OSFAQ (or Google) for a link.