Does an interrupt service routine exist to help me clear the screen of the terminal? Will it work on windows?
Setting a graphics mode through BIOS (int 10h with AH=0) will clear the screen.
Scrolling the screen up or down through BIOS (int 10h with AH=6 or 7) can clear the screen as well.
This will only work where you can invoke BIOS service functions.
MSDOS is where this will always work.
In Windows this will work only in DOS applications and if Windows can actually run them. 64-bit editions of Windows don't support DOS applications at all and starting with Windows Vista even in 32-bit editions of Windows many DOS apps don't work fully.
Remember also that if a DOS application runs in a window in Windows, only that window will get cleared, not the entire screen.
I got this to work (used qemu, NASM)
(http://www.gabrielececchetti.it/Teaching/CalcolatoriElettronici/Docs/i8086_and_DOS_interrupts.pdf)
call cls
jmp $
cls:
pusha
mov ah, 0x00
mov al, 0x03 ; text mode 80x25 16 colours
int 0x10
popa
ret
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With