: OK, i know how to plot pixels using the dos interupt
: int 10h
: but its damn slow, how do i plot pixels on the screen, in a graphics mode tahtas much faster!!????? i read somewhere you can directly acces the video ram, is this os, and if so can someone point me in the irght direction, ???
Easiest is to call in 10h to set screen mode, preferably mode 13h, because it has 8-bit colors, with bits in a 'normal' bitmap order. (byte 1 is pixel (0,0), byte 2 is pixel (1, 0), byte 3 (2, 0) etc tilll byte 64000 which is (319, 199) The screen buffer is allocated at 0A000h:0000h in the memory (in real mode adress...) under most real mode OSses (All ??) you can directly access it. in the windows dos-box you can also do so, but you can not do so in most Protected mode OSses. (windows outside dos-box, all UNIXes, etc.)
You can also directly programm the video card to set modes/plot pixels, but that seems pretty insane to me, if you don't exactly know what you are doing ... no debugger can help you with that
But that would be even faster than using the frame buffer ...
an example code to plot a pixel would be: (Mode should already be set to 13h)
; let es:di point to the screenbuffer
mov ax, 0A000h
mov es, ax
mov di, 0
; clear ax, set cx to number of pixels, to clear the screen
mov ax, 0
mov cx, 64000
; clear screen
; plot a red pixel at (10, 10)
mov al, 04h
mov di, 10+(200*10) ; (column+(row*200)) is offset in buffer...
; done ...
Just try it out, and read some documentation! there is plenty of good docs on this website ...
SUSE LINUX 7.3 PRO - The world starts behind windows