[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sleep in laden's shutdown
From: |
Glen Kaukola |
Subject: |
sleep in laden's shutdown |
Date: |
Tue, 01 Feb 2005 20:27:08 -0800 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041127) |
Hi there.
Here's what I came up with for sleeping a little while in laden's
shutdown function:
pushl %eax
movl $0xFFF, %eax
sleep: subl $1, %eax
hlt
cmp $0, %eax
jne sleep
popl %eax
My previous attempt was to use a bios call, but for some reason it
didn't work out too well. Just wondering if anyone can tell me why the
following didn't work:
pushl %edx
pushl %eax
movw $0, %cx
movw $0, %dx
movb $0x86, %ah
int $0x15
popl %eax
popl %edx
popl %ecx
Oh, and by the way, the push and pop stuff can maybe be done away with
if it's assembly thrown into some C code. I just have that there since
I'm testing things by throwing it into laden's ia32-crt.S file. But
then I'm by no means an expert on this stuff so maybe it needs to stay
there after all.
Glen
- sleep in laden's shutdown,
Glen Kaukola <=