Search the web
Sign In
New User? Sign Up
fdb · FDB's "Advanced Programming" list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Delay in ASM   Message List  
Reply | Forward Message #18 of 103 |
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






Sun Jun 11, 2000 6:14 pm

khanoa@...
Send Email Send Email

Forward
Message #18 of 103 |
Expand Messages Author Sort by Date

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...
Ovais Ahmad Khan
khanoa@...
Send Email
Jun 11, 2000
10:27 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help