Video mode 12h, as others have mentioned, is a "planar" mode which makes things a bit complicated...perhaps, first, you should try video mode 13h (there is tons of stuff about this on the 'net...as it's got to be the easiest (and most wasteful but that's another story ;) graphics video mode ever constructed...horrible resolution, mind you...it's 320x200 in 256 colours :)...that should give you grounding in the things you generally need to do for graphics modes (as opposed to the text modes that the book has already shown :)...then, once mastered, you can move to video mode 12h which has the added problem of "bitplanes" for you to learn about too... [ Cautionary word of warning: Video mode 12h is one of the most awkward graphics modes to use on the PC...only ModeX modes would be worse than mode 12h and there's no way you're going to understand ModeX modes until you learn all about "planar" modes like mode 12h (ModeX modes are very "advanced" because they aren't standard BIOS video modes at all and the way "bitplanes" work in them is, quite frankly, a little bit insane... ] By coincidence, I've just written a "mini-tutorial" about video mode 13h in the thread "Doing graphics + hardware I/O + misc" over in have no great difficulties getting video mode 13h mastered... As for video mode 12h, it's a bit of an exception because it's a "planar" mode...you'll also note that the memory window for the video framebuffer at A000h is only 64KB in size...but if you do the maths, video mode 12h requires a minimum of 640x480 with 4 bits per colour = 150KB...it's too big!! It won't fit into the A000h segment...but not to worry because this is where "bitplanes" come into the picture...for mode 12h, there are 4 bitplanes (the amount of bitplanes _should_ equal the amount of bits required for the colour value...with ModeX modes, this isn't true and is what makes them slightly insane...but, generally, if a mode is "planar" then the number of colours should tell you how many bitplanes there are...2 to the power of the bitplanes should tell you the colour depth...or, of course, the other way around too :)...each "bitplane" is a bit like a sheet of acetate with a monochrome picture on it...if you take four of these "bitplane" acetate sheets and then overlay them on top of each other on one of those overhead wall projector machines, then the light shining through each acetate will "merge" together to form one picture on the wall...that's roughly how bitplanes in "planar" modes work too... [ ASCII graphics follows...set font to a fixed font like courier to see properly :) ] +---------------+ Bitplane #0 | O | | +-----\---------+ Bitplane #1 | | O | | | +-----\---------+ Bitplane #2 | | | O | | | | +-----\---------+ Bitplane #3 | | | | O | | | | | | Each bitplane is actually perfectly aligned on top of each other but, for the purposes of making the diagram readable, I've offset them to show each one individually (each "sheet" of acetate would be exactly the same size and their corners would meet up exactly...but you just can't show that with ASCII graphics :)...the "O" symbols all are the same pixel (same x and y co-ordinates :) but on different bitplanes...each bitplane itself is ONLY a monochrome bitmap so the pixel in each bitplane is either off or on (zero or one :)... The VGA card, though, will compose each of the bitplanes together - just like the actetate sheets "merge" when we put them together on the overhead wall projector - when it renders the framebuffer...as mode 12h is a 16 colour mode, we only need 4 bits to select any one of the colours...and, simply, those four bits of the colour value are the four different bits in each of the bitplanes...we're reading it "laterally", if you like...bitplane #0 has a monochrome image of every bit #0 in the colour value on the screen...bitplane #1 is bit #1 of the colour...bitplane #2 is bit #2 of the colour...bitplane #3 is bit #3 of the colour...the diagonal line in the ASCII graphics shows the line along which we read the colour value for the pixel... So, to plot colour 15 (white), we plot a single bit in each of the bitplanes at the same screen location...to plot colour 1, we'd plot the single bit in bitplane #0 but would "unplot" those same bits in the other bitplanes...the binary value of the colour is 4 bits and, simply, each bit of that value tells you whether to plot or "unplot" the bit in the bitplane (unplotting - setting the pixel bit to zero - is as important as plotting - setting the pixel bit to one - because it is the _combined_ values of each bitplane that specifies the colour :)... Okay, now that you've Hopefully got the rough idea about bitplane modes, we can actually get to video mode 12h's implementation of it...as mentioned earlier, the memory window at A000h is only 64KBs in size so there's not enough room to access the entire screen in one go...but there _is_ enough room (640x480/8 bits = 37.5 KB :) for one monochrome bitplane image...so, once you've set up video mode 12h then the video memory at A000h is essentially a 1 bit per pixel monochrome image of the screen...with 80 bytes (80 x 8 = 640 pixels :) for each scanline, repeated 480 times down the screen... And to control which bitplane we're currently writing to, there's a separate VGA register (accessed using port I/O commands :) which lets us set which bitplanes to write to...it is possible with this register to specify more than one bitplane as "active"...all this means is that any of your writes to video memory will go to _more than one_ bitplane at the same time...for reading a pixel value back, there's another _different_ VGA register which specifies which bitplane you want to read from...in the case of reading, it's only possible to specify _one_ bitplane at a time (so to read the full colour information of a pixel requires four reads(!) and four changes to the read bitplane register :)... To get at the write bitplane register, you have to send 02h to port 03C4h to specify you want to set the write bitplane register and then you send a value from 0-15 to port 03C5h to set which bitplanes are "active" (alternatively, as I do in my program, you can use a 16-bit port write command to set both at the same time...but, if you do this, be careful about the order...02h goes into AL and your value goes into AH...the 16-bit writes are "byte-reversed" because Intel chips are little-endian...I mention this because it's a really easy mistake to put them the wrong way round...yes, so simple that I did it when I was writing my code example...hehehe :)... The read bitplane register is set by writing 04h to port 03CEh and then which bitplane you want to read from is sent to port 03CFh (you can also do this with one 16-bit port write too :)...my example code below doesn't actually do any reading, though...the thing to note about setting the read bitplane register is that, though you can set multiple _write_ bitplanes in one go, you can only set _one_ read bitplane at a time...and, therefore, the value you send to port 03CFh is in the range 0-3 (0 = bitplane #0, 1 = bitplane #1, etc. :)...BUT, when you set the write bitplane the range is 0-15 (bit #0 = bitplane #0, bit #1 = bitplane #1, etc. :)...again, I'm stressing the difference between the two here because the values are interpreted differently for the read and write bitplane registers and it's easy to forget or get mixed up or something...just stressing it to save you all from horrible debugging sessions where you just can't work out what's gone wrong...hehehe :) The palette can also be changed to any 16 colours from the usual 24-bit range, just like I've already explained in my other post about you're given actually neatly corresponds that bitplane #0 is blue, bitplane #1 is green, bitplane #2 is red and bitplane #3 is "intensity" (bright colours :)...but there's nothing sacred about the standard palette at all and you can set any colour to anything you like...in fact, you can get some groovy-looking "planar" special effects by setting up special palettes (set most of the colours to black or something and then set a few to different colours and then the graphics only show up when certain combinations of bitplanes align...this can give an interesting "cut out" effect where one graphic is masked out by another...I was going to add this to my example, actually, but it got big enough without the extra code for that, ...