home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
pb
/
library6
/
reboot.doc
< prev
next >
Wrap
Text File
|
1990-08-16
|
1KB
|
43 lines
**** NOTICE ****
This is a potentially hazardous routine, and I make no claims whatsoever
about it's functionability or suitability for a given purpose. By using
this routine, you accept any problems that may occur by said use.
****************
Subroutine: Reboot
Purpose: Allow user to perform a warm start during program execution
Warnings: You should ensure that all files have been closed properly
before calling this subroutine. Mis-use can (and probably
will) result in corrupt data files.
Setup: Link the object file into the main program and declare the
subroutine:
$link "REBOT.OBJ"
declare sub Reboot()
Calling: CALL Reboot
While other methods can be used to reboot a computer, this one takes
up only 9 bytes. This is the only method that I have found that will
reliably reboot my computers. Following is the .ASM code.....
Public Reboot ; declare Reboot as a public subroutine
Code Segment Byte ; define code segment
assume cs:code ; tell the compiler about the code segment
Reboot Proc Far ; reboot is a far process
mov ax,0ffffh ; push the segment
push ax ; and the offset
mov ax,0000h ; of the bios warm start routine
push ax ; onto the stack.
retf ; run the routine.
Reboot EndP ; end of reboot process
Code EndS ; end of code segment
End ; end of .asm program