Help In ASM

Programming, for all ages and all languages.
Post Reply
thoover

Help In ASM

Post by thoover »

Im tring to find a way to get more than 256 colors in asm i want at least 16,777,216, 16 bit color, im using fasm to create binary files and am programing directly to the video memery.
blip

Re:Help In ASM

Post by blip »

16,777,216 colors would be 24-bit color.

For VGA you can't display over 256 colors at a time, but with a trick you can give the illusion of 3840 using the FAKEMODE method. Other than that your only options are to program a driver for every card (undesirable) or to use VESA. VBE3 doc and VBE2 doc (most cards support at least v2.0).
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Help In ASM

Post by Pype.Clicker »

i'd suggest you to get a look at the programs on http://www.dex4u.com/ ... they're virtually all written in FASM, most of them do use VBE to do 24-bit or 32-bit color painting ...

Most of them are bootsectors, though ... manipulating the framebuffer of supervga screens require more memory than real mode offer, and changing video with the BIOS (including VBE) require real-mode operations, so the natural way to go is to setup "unreal" mode for those ...

Hope you won't find it confusing ... maybe we can suggest you clearer alternatives if you mention why you need so many colours in ASM, hmm ?
Post Reply