First post, by Bondi
- Rank
- Oldbie
I'm writing a little programm in assembly language and need some help. I'm trying to get 1 ms delay.
Now this code below counts clock ticks, but to my understanding it's min delay is arounf 50 ms. if delay variable is set to 1. 18 is around one second.
delay:
pusha
pushf
mov ah, 0
int 1ah
mov di, 18 ;delay variable
mov ah, 0
int 1ah
mov bx, dx
wait:
mov ah, 0
int 1ah
sub dx, bx
cmp di, dx
ja wait
popf
popa
ret
There is also this simple loop. But not sure what loop count value to set on a P200 Mhz to have 1 millisecond delay?
mov cx, 10000 ;loop count
.delay:
nop
loop .delay