Is there any way of clearing the screen in ASM?
The reason why I ask is because im working on a OS in ASM, and I need to clear the screen when the PC boots....
CLS in ASM
I don't know ASM, but I think I can give a possible method.
That will reset all video memory to 0. Hence, blank screen. (Assuming of course that color zero is black.)
Code: Select all
Point to video memory address: 0 offset.
Get each byte of video memory and XOR it with itself.
lol sorry.
maybe try this: (from http://www.codeguru.com/forum/archive/i ... 26197.html)
maybe try this: (from http://www.codeguru.com/forum/archive/i ... 26197.html)
mov ax,3
int 10h
This one set 80x25 text mode. I don't know if you're working i that one and if no, here are some other modes:
0 -> 40x25
1 -> 40x25
2 -> 80x25
3 -> 80x25
It looks as if XP is blocking the interrupt call so that any other mode cannot be set. Blocked or not, this method still clears the screen.