I was wondering that since in real mode you can use
Code: Select all
mov ax, 0x0013
int 0x10
Thanks.
Code: Select all
mov ax, 0x0013
int 0x10
Note, however, that this is not trivial, as you'll have to set all registers by yourself. Possible, but tricky, and not guaranteed to work on all cards.Masterkiller wrote:In Pmode you must use VGA registers to do that.
You can read more about it here: http://www.osdever.net/FreeVGA/vga/vga.htm#register
In 256 colour mode, each byte in video memory refers to one pixel. A byte can have a value of 0-255, so there's a maximum of 256 different colours on the screen (without trickery). A value of 0-255 doesn't directly specify a colour. Instead, it refers to a programmable table inside the VGA hardware that has 256 entries (for each of the values 0-255), and for each entry a Red, Green and Blue value specifying the colour. On the VGA, the RGB values are 6-bit, which means that each R, G and B component is specified as a value between 0 and 63 (0 meaning least intensity and 63 meaning maximum intensity for that component). This makes for a total number of 262144 (256K) possible colours (but as said, you can only show 256 at a time). The palette is programmable through the DAC registers (see link Masterkiller specified).t6q4 wrote:And also, I have just stumbled onto this, so could someone help explain the 256-colour pallete, please.
There are several ways to set a graphics mode:t6q4 wrote:Hello,
I was wondering that since in real mode you can usein real mode to go to 256-colour mode, how can you do this in Pmode? And also, I have just stumbled onto this, so could someone help explain the 256-colour pallete, please.Code: Select all
mov ax, 0x0013 int 0x10
Thanks.