View Single Post
Old Sep 14th, 2005, 12:56 PM   #9
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
about the video cards... i'll tell you first how text mode works, because that's the only thing i know exactly atm When you boot the operating system and switch to protected mode, the video memory will be at 0xB8000. Every character on the screen will be 2 bytes. The first byte the actual character, the second byte the color. An example (dunno this is correct, but it is something like this):
short *vidmem = (short *) 0xB8000; // pointer to the video memory

vidmem[0] = 'H' | 0x07; // print a white H at the upperleft corner
vidmem[1] = 'i' | 0x07; // print a white i right to the H
For graphic stuff you can either use VESA, a standard or the special video software, which includes 2D and/or 3D accelaration. When you use VESA, you have a piece of memory where you can write your pixel data. That piece of memory contains only 1/5 of your screen (or something like that). Such a piece is called a bank. You can switch between the banks using the asm out instruction, IIRC.

about how the cpu executes the 1s and 0s? I have no idea
Polyphemus_ is offline   Reply With Quote