proc AshotMovement
cmp [yAS],190
jae resetAShot
; check if shot hit something
call checkHit2
cmp [hitObject],3
je resetAShot
cmp [hitObject],2
je resetAShot
mov si, offset Ashot
push cx
push [yAS]
call printAShot
pop [yAS]
add [yAS],4
pop cx
jmp exitAShotMovement
resetAShot:
mov [AshotFired],0
mov [AdeleteShot],1
call printAShot
mov [AdeleteShot],0
push [y0S]
pop [yS]
exitAShotMovement:
ret
endp AshotMovement
the two first lines of the procedure makes it lag and run really slow, i checked it, i tried to understand what the problem and ran it without the lines and it ran smoothly the problem is i really need this lines, what can i do to fix it? please help
New contributor
Kim Strugo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.