Hi,
I want to write a routine that will cause a specified milliseconds of
delay on any x86 based machine, as we can do in TC/BC. The problem is
that how could i identify the processor and GUARANTEE the same amount of
delay. I know even then the delay will not be the same but there will be
less difference
I have to use it in my project which is a modem communication program.
Currently i'm using the attached code. it causes my 333 MHz PII to cause
half of the specified delay. I wrote the first code by timings
calculating timings, but that ended in a blink. Here is the code:
; Delay using nop
Delay macro time
Local L1,L2
push ax
push cx
mov cx,time
L1:
mov ax, 40000
L2:
nop
nop
nop
nop
dec ax
if_ax },0,L2
loop L1
pop cx
pop ax
endm
--
Ovais.
********************
A world without walls needs
neither windows nor gates