2003-01-22 11:21:43

by Electroniks New

[permalink] [raw]
Subject: sleep in asm

Hi,
What is the equivalent of sleep in assembly.
I tried jmps and nops i even kept loops.for jumps
and nops but all in vain .
Does it make any difference if i am doing this real
mode instead of pmode ? doesnt the functions nop and
jmps do what they are supposed to do . 16000 nops
doesn't sleep for 1 sec.

Any help would be appreciated.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


2003-01-22 12:35:01

by Richard B. Johnson

[permalink] [raw]
Subject: Re: sleep in asm

On Wed, 22 Jan 2003, Electroniks New wrote:

> Hi,
> What is the equivalent of sleep in assembly.
> I tried jmps and nops i even kept loops.for jumps
> and nops but all in vain .
> Does it make any difference if i am doing this real
> mode instead of pmode ? doesnt the functions nop and
> jmps do what they are supposed to do . 16000 nops
> doesn't sleep for 1 sec.
>
> Any help would be appreciated.

hlt # Waits until the next interrupt


Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.


2003-01-22 12:31:26

by Terje Eggestad

[permalink] [raw]
Subject: Re: sleep in asm


a) a little but of math helps, on a 1GHz pentium 16000 nops is only
about 5-6 usecs. This is superscalar machines that do three inst per
clock.

b) are you in user space or kernel space?

c) if the answer in b) is that your doing some embedded stuff, you Q on
if it matter if you're in real or protected mode indicate that, then
you're on the wrong mailing list. pls stop posting .

d) 1 sec cpu time, or wall time?

e) do you want to sleep, or burn CPU cycles?

f) why assembly?



On ons, 2003-01-22 at 12:30, Electroniks New wrote:
> Hi,
> What is the equivalent of sleep in assembly.
> I tried jmps and nops i even kept loops.for jumps
> and nops but all in vain .
> Does it make any difference if i am doing this real
> mode instead of pmode ? doesnt the functions nop and
> jmps do what they are supposed to do . 16000 nops
> doesn't sleep for 1 sec.
>
> Any help would be appreciated.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
_________________________________________________________________________

Terje Eggestad mailto:[email protected]
Scali Scalable Linux Systems http://www.scali.com

Olaf Helsets Vei 6 tel: +47 22 62 89 61 (OFFICE)
P.O.Box 150, Oppsal +47 975 31 574 (MOBILE)
N-0619 Oslo fax: +47 22 62 89 51
NORWAY
_________________________________________________________________________