I made a 1 second timer code that has 2 procedures, One is calculating the end time and the other is always checking the time in order to see if that time happened. Most of the times the 1 second timer works but sometimes it doesn't wait 1 second but 4... Any
proc calculateNewCubeTime
pusha
mov ah, 2ch
int 21h
mov [drawTime], dl
cmp [drawTime], 0
je add99
dec [drawTime]
jmp endCalculateDrawTime
add99:
add [drawTime], 99
endCalculateDrawTime:
popa
ret
endp calculateNewCubeTime
proc checkIfTimeToDrawNewCube
pusha
mov ah, 2ch
int 21h
cmp dl, [drawTime]
jne endCheckDrawTime
mov [newDrawCube], 1
endCheckDrawTime:
popa
ret
endp checkIfTimeToDrawNewCube