ACPI and BIOS

Status
Not open for further replies.

tjetson94

Beta member
Messages
2
Hello

I used to have an account here a few years ago, but seem to have forgotten the username, password and email I used! Anyway, I am creating a small program in Assembly, which is put into the boot sector of a floppy disk, so I can play around with the computer, learn how it boots, etc. One thing I would like to learn how to do, but can't seem to find, is how to reset and turn off the computer. The closest I came to finding it was learning that there is some sort of interface with the ACPI in the BIOS. I had a look at a list of interrupts for the BIOS, and none seem to have any relationship with the ACPI. I wonder whether anyone could point me in the right direction as to how to interface with the ACPI, and send commands to restart or shut down the computer.

I have been doing all my testing inside a virtual machine with VirtualBox, and using virtual floppy images, so there is no risk of bricking the BIOS or anything like that.

Thanks
 
A quick update on the situation. After looking further it appears that loading 0 into ah and then calling interrupt 19h is supposed to reboot. I use the following code:
Code:
xor ah, ah
int 16h

mov ah, 0x00
int 19h
This code is supposed to wait for a keypress, then reboot the machine. I note that hitting a key seems to cause write activity from the floppy. I believe that the boot sector is copied from the boot drive to RAM when the computer is booting. This would tell me that there would be no further drive activity during booting. The fact that I see activity seems to indicate the machine is indeed booting (it is copying the sector over again). However, when one boots a machine inside VirtualBox, one sees the VirtualBox logo; plus my VM has the hard drive as the first boot drive. However each time I hit a key it just keeps displaying a black screen.

What I think is happening is the computer is indeed rebooting, but it isn't doing POST again, and isn't checking the correct boot order. What I am trying to code is like what happens if you do Start->Shutdown->Reset on Windows. The computer fully reboots, does POST, and boots from the hard drive. Does anybody know how I can instruct the BIOS to do this? I had the thought that maybe it is impossible, but it is obviously possible to do, as Windows does it.
 
Status
Not open for further replies.
Back
Top Bottom