Assembly program help
-
29-09-2019 - |
Question
I have a program that is supposed to clear the screen and print my name, then new line and print my name again. but when i run it nothing shows up. just program teminated normally. I'm doing this in windows command prompt using debug.
call 010E
call 0125
call 012D
call 0125
int 20
push ax #clearscreen(010E)
push bx
push cx
push dx
xor al, al
xor cx, cx
mov dh, 18
mov dl, 4f
mov bh, 07
mov ah, 06
int 20
pop dx
pop cx
pop bx
pop ax
ret
mov dx, 0200 #printline(0125)
mov ah, 09
int 21
ret
push ax #new line( 012D)
push dx
mov ah, 02
mov dl, 0d
int 21
mov dl, 0a
int 21,
pop dx
pop ax
ret
DB' Antarr$ #(0200)
Solution
OTHER TIPS
You are trying to call a hardware interrupt (int 20). Because of protected mode, you're not going to be able to enter mode 20. In other words, Windows is going to block you from talking to the hardware directly.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow