Original Post
i''ve been studying some assembler this week just for fun(!)... i think i know the basic stuff, so i tried to do something more advanced today... i got mode 13h working at first time i tried and i can even plot some pixels to the screen (wow!
), but i didn''t get backbuffer (aka virtual screen) working. this routine should clear backbuffer with color 0:
mov ax, offset BACKBUFFER ;take offset of backbuffer
mov es, ax ;move offset to es:di
xor di, di ;dunno if this is needed
mov ax, 0 ;source (fill color)
mov cx, 32000 ;rep parameter... loop 32000 times
rep stosw ;copy ax to es:di and increase di every time
i''ve defined BACKBUFFER like this:
BACKBUFFER db 320*200 dup (?)
what''s wrong with it? when i run it, my system crashes and i have to reboot.