Here's some info: [code] 30.1 WARM AND COLD REBOOT
Within DOS, there are two types of rebooting. There is the warm reboot that is evoked by pressing the "Ctrl-Alt-Del" key combination. During this reboot, all Power On System Tests, POSTs, are performed with the exception of the memory tests. In addition to the POSTs, interrupt vectors are reinitialized and system timers reinitialized. In other words, the BIOS code initializes the computer system to such a state that the computer system is ready for loading the operating system. Issuing an interrupt 19h does the loading of the operating system.
The second type of rebooting is a cold reboot that occurs when the system is turned on. The only difference between a cold reboot and a warm reboot is the performing of the memory tests.
30.2 PERFORMING A REBOOT FROM SOFTWARE
Whether a cold or warm reboot is performed depends upon the value if the reset flag in the ROM BIOS data area. If this flag is set to 1234h, a warm reset is performed. Any other value results in a cold reboot. Usually a zero is loaded for the cold reboot. Code snippets to do this are:
ROMBIOS segment at 0f000h org 0fff0h Reset label far ROMBIOS ends
In your code:
mov ax, seg ROMBIOS_DATA mov ds, ax ASSUME ds:ROMBIOS_DATA mov ResetFlag, 1234h ; or 0 if cold reset is desired jmp Reset
30.3 WARNINGS!
Neither the warm nor the cold boot flushes buffers, system, smartdrv, and EMM386, or notifies TSRs. This can lead to lost of data. The best source code that considers most of this is:
Using this interrupt alone will only reload the operating system onto a computer system that may not be initialized properly for it. The interrupt vectors are not reset but the TSRs that have hooks into the interrupt table may be overwritten. Obviously, this can lead to the system hanging if one of these hooked and overwritten interrupts is called. Other problems can be timers not reset or add-on cards not reinitialized properly. So, do NOT use Int 19h to reboot the computer.
30.5 USING F000:E05B INSTEAD OF F000:FFF0 AS THE JUMP ADDRESS
In the original IBM ROM BIOS, the instruction at f000:fff0 was a long jump to f000:e05b. Some programs skipped the jump at f000:fff0 and went directly to the second address which is the start of the reset procedure in ROM BIOS. I checked my 386 with non-IBM BIOS, and the start of the reset procedure is at the same address. I believe that using the second address is dangerous because there is not any guarantee that it will stay the same. In addition, if you are rebooting the computer what is the reason in saving a few cycles! Stay with the address f000:fff0 as the jump there always will take the execution path to the correct code.
Contributor: Raymond Moon, [email protected] Last changed: 20 Dec 96
: What I have to do is reboot the pc working under DOS (not with CTRL-ALT-DEL!!) and using MASM (I have to use MASM..) : : How can I do? : I found int 19h, is this all? : Why do you have to use MA$M? Just wondering...
: What I have to do is reboot the pc working under DOS (not with CTRL-ALT-DEL!!) and using MASM (I have to use MASM..) : : How can I do? : I found int 19h, is this all? :
Are you aware that the code won't work in a DOS box.
: : What I have to do is reboot the pc working under DOS (not with CTRL-ALT-DEL!!) and using MASM (I have to use MASM..) : : : : How can I do? : : I found int 19h, is this all? : : : : Are you aware that the code won't work in a DOS box. :
Comments
[code]
30.1 WARM AND COLD REBOOT
Within DOS, there are two types of rebooting. There is the warm reboot
that is evoked by pressing the "Ctrl-Alt-Del" key combination. During
this reboot, all Power On System Tests, POSTs, are performed with the
exception of the memory tests. In addition to the POSTs, interrupt
vectors are reinitialized and system timers reinitialized. In other
words, the BIOS code initializes the computer system to such a state
that the computer system is ready for loading the operating system.
Issuing an interrupt 19h does the loading of the operating system.
The second type of rebooting is a cold reboot that occurs when the
system is turned on. The only difference between a cold reboot and a
warm reboot is the performing of the memory tests.
30.2 PERFORMING A REBOOT FROM SOFTWARE
Whether a cold or warm reboot is performed depends upon the value if the
reset flag in the ROM BIOS data area. If this flag is set to 1234h, a
warm reset is performed. Any other value results in a cold reboot.
Usually a zero is loaded for the cold reboot. Code snippets to do this
are:
ROMBIOS_DATA segment at 0400h
org 72h
ResetFlag dw ?
ROMBIOS_DATA ends
ROMBIOS segment at 0f000h
org 0fff0h
Reset label far
ROMBIOS ends
In your code:
mov ax, seg ROMBIOS_DATA
mov ds, ax
ASSUME ds:ROMBIOS_DATA
mov ResetFlag, 1234h ; or 0 if cold reset is desired
jmp Reset
30.3 WARNINGS!
Neither the warm nor the cold boot flushes buffers, system, smartdrv,
and EMM386, or notifies TSRs. This can lead to lost of data. The best
source code that considers most of this is:
ftp://ftp.simtel.net/pub/simtelnet/msdos/bootutil/reboot33.zip
Full source code is available.
30.4 JUST USING INT 19H
Using this interrupt alone will only reload the operating system onto a
computer system that may not be initialized properly for it. The
interrupt vectors are not reset but the TSRs that have hooks into the
interrupt table may be overwritten. Obviously, this can lead to the
system hanging if one of these hooked and overwritten interrupts is
called. Other problems can be timers not reset or add-on cards not
reinitialized properly. So, do NOT use Int 19h to reboot the computer.
30.5 USING F000:E05B INSTEAD OF F000:FFF0 AS THE JUMP ADDRESS
In the original IBM ROM BIOS, the instruction at f000:fff0 was a long
jump to f000:e05b. Some programs skipped the jump at f000:fff0 and went
directly to the second address which is the start of the reset procedure
in ROM BIOS. I checked my 386 with non-IBM BIOS, and the start of the
reset procedure is at the same address. I believe that using the second
address is dangerous because there is not any guarantee that it will
stay the same. In addition, if you are rebooting the computer what is
the reason in saving a few cycles! Stay with the address f000:fff0 as
the jump there always will take the execution path to the correct code.
Contributor: Raymond Moon, [email protected]
Last changed: 20 Dec 96
[/code]
\\||////
@)
ASHLEY4.
:
: How can I do?
: I found int 19h, is this all?
:
Why do you have to use MA$M? Just wondering...
: Why do you have to use MA$M? Just wondering...
:
It's for an exam, and this is what the prof. wants, that's all
:
: How can I do?
: I found int 19h, is this all?
:
Are you aware that the code won't work in a DOS box.
: :
: : How can I do?
: : I found int 19h, is this all?
: :
:
: Are you aware that the code won't work in a DOS box.
:
I know, thanks
MOV AL,0Fh
OUT 64H,AL
4 bytes to rule them all and in the darkness Reboot them....
We saved this as reboot.com
Theresa
MOV AL,0Fh
OUT 64H,AL
4 bytes to rule them all and in the darkness Reboot them....
We saved this as reboot.com
Theresa
MOV AL,0Fh
OUT 64H,AL
4 bytes to rule them all and in the darkness Reboot them....
We saved this as reboot.com
Theresa