BBS: Inland Empire Archive Date: 02-16-93 (20:34) Number: 298 From: JOE NEGRON Refer#: NONE To: ERIC MAYS Recvd: NO Subj: Re-Boot Conf: (2) Quik_Bas
EM> HELLO, ALL
> IS THERE ANY WAY TO RE BOOT THE COMPUTER USING A QBASIC OR
> MACHINE LANGUAGE IN A QBASIC PROGRAM CODE..
First, lose the caps Eric. All caps is considered shouting, and is not
good BBS etiquette.
Second,
============================== Begin code ==============================
'If you are using QuickBASIC 4.5, change this to 'qb.bi'
'$INCLUDE: 'qbx.bi'
DECLARE SUB Reboot (BootType%)
'***********************************************************************
'* SUB Reboot
'*
'* PURPOSE
'* Reboots the machine by executing the machine language procedure
'* located at FFFF:0000.
'*
'* EXTERNAL ROUTINE(S)
'* QBX.LIB
'* -------
'* SUB Absolute (Address%)
'***********************************************************************
SUB Reboot (BootType%) STATIC
DEF SEG = &H40
POKE &H72, 0 - ((BootType% = 0) * &H34) 'if BootType% = 0, perform
POKE &H73, 0 - ((BootType% = 0) * &H12) ' a warm boot, else a
' cold boot
DEF SEG = &HFFFF 'set segment to bootstrap loader
Absolute 0 'do system call
END SUB
=============================== End code ===============================
--Joe in Bay Ridge, Brooklyn, NY--
Tue 02-16-1993, 20:34
... Evolution: Life's a niche and then you die.
___
X Blue Wave/QWK v2.12 X
$$
--- Maximus 2.01wb
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET