I have problem with this code. While printing a picture to the screen, it hangs as if it is going into an infinite loop. It works but stops drawing. Also, when you skip the part that constantly hangs, it gives an error directly.I searched the internet but couldn't find any results. I'm waiting for your help.
.model small
.stack 64
.DATA
.CODE
screen macro
mov ah,00
mov al,13h
int 10h
endm
clear_screen macro
mov ax,600h
mov bh,07h
mov cx,0
mov bx,184fh
int 10h
endm
yatay macro x,y,c
local myloop
local loop2
mov cx,x
mov dx,y
mov bh,0h
mov bl,5
loop2:
mov [200h],bl
mov [202h],cx
mov bl,5
myloop:
mov ah,0ch
mov al,c
int 10h
inc cx
dec bl
cmp bl,0
jnz myloop
inc dx
mov bl,[200h]
mov cx,[202h]
dec bl
cmp bl,0
jnz loop2
endm
main proc far
mov ax,@data
mov ds,ax
clear_screen
screen
yatay 90d,1d,04
yatay 95d,1d,04
yatay 100d,1d,04
yatay 105d,1d,04
yatay 85d,5d,04
yatay 105d,5d,04
yatay 110d,5d,04
yatay 75d,10d,04
yatay 80d,10d,04
yatay 90d,10d,04
yatay 95d,10d,04
yatay 100d,10d,04
yatay 110d,10d,04
mov ah,4ch
int 21h
main endp
end main
</code>