The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: xman_1365_x on December 03, 2010, 12:45:36 PM

Title: how to reboot a computer of bios Interrupt and other ways ?
Post by: xman_1365_x on December 03, 2010, 12:45:36 PM
hi all,i`m new user in forum
i dont how to restart or shutdown pc in assembly in dos or win (Interrupt bios & dos or api)
i think int CF9h is for reboot
plz help me about problem and say all ways + source for example
tanx a lot
Title: Re: how to reboot a computer of bios Interrupt and other ways ?
Post by: dedndave on December 03, 2010, 01:32:05 PM
well - i am pretty sure it isn't INT CF9h, seeing as INT's only go as high as FFh   :P
why do you want to do this ???

welcome to the forum   :U
Title: Re: how to reboot a computer of bios Interrupt and other ways ?
Post by: redskull on December 03, 2010, 01:32:18 PM
For DOS, you use INT 19.  Under a DOS box this will, of course, only shutdown the emulator.  CF9 is PORT number which, on some PC's, is routed to the RESET pin (I think?).  It depends on the hardware and certainly won't work under Windows or a DOS box

-r
Title: Re: how to reboot a computer of bios Interrupt and other ways ?
Post by: FORTRANS on December 03, 2010, 01:49:56 PM
Hi,

   To shut down the computer you need to program the power
management system.  Search on APM and ACPI.

   To reboot you send a command to the keyboard controller
to reset the system.

   There are only 256 interrupts (0 ... 0FFH) so your information
is incorrect.  Int 19H is used by the BIOS to bootstrap the
computer.  My reference says a user should not use this
because it can leave the system in a corrupted state, but
what the heck.  Won't work under Windows anyway.

Cheers,

Steve
Title: Re: how to reboot a computer of bios Interrupt and other ways ?
Post by: xman_1365_x on December 03, 2010, 09:21:26 PM
oh sorry for mistake -> " i think int CF9h is for reboot "
int is false
port is true


this link is about port CF9h
http://objectmix.com/asm-x86-asm-370/69246-how-reboot-computer-immediately-programming-2.html
but i do n`t understand :D

i need source or example for this problem! in dos & win (apm & acpi)
and Sorry for mistakes I know little English
tanx
Title: Re: how to reboot a computer of bios Interrupt and other ways ?
Post by: xman_1365_x on December 03, 2010, 09:32:39 PM
Also does not work INT 19h !!!

and

org 100h

MOV AX,0040
MOV DS,AX
MOV Word Ptr [0072],0
JMP 0F000h:0FFF0h

ret
Title: Re: how to reboot a computer of bios Interrupt and other ways ?
Post by: redskull on December 03, 2010, 09:41:39 PM
Quote from: xman_1365_x on December 03, 2010, 09:21:26 PM
i need source or example for this problem! in dos & win (apm & acpi)

None of these ways will work under Windows, you need to use the InitiateSystemShutdown() function, and be running as an administrator.  APM and ACPI will not work in DOS, beacuse DOS needs special drivers to interface with those.  INT 19 and JMP 0F00:0FFF0h work just fine under DOS to reset the computer, so you are doing something wrong.

-r
Title: Re: how to reboot a computer of bios Interrupt and other ways ?
Post by: BogdanOntanu on December 03, 2010, 10:02:51 PM
You have been given pretty nice answers from people here and yet you give very little info about what and why you want to do this...

This thread is locked until you let me know what is the reason for this "need" of yours to shutdown the computer ;)