BBS: Inland Empire Archive
Date: 04-07-93 (04:29)             Number: 325
From: JOE NEGRON                   Refer#: NONE
  To: CHAD GUNTER                   Recvd: NO  
Subj: Reboot                         Conf: (2) Quik_Bas
CG> Does anyone know how to make the computer reboot from inside
  > QB? Thanx!

Here you go:

============================== Begin code ==============================

'$INCLUDE: ''       'replace with if you're using PDS

DECLARE SUB Reboot (BootType%)

'* SUB Reboot
'*    Reboots the machine by executing the machine language procedure
'*    located at FFFF:0000.
'*    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 code ===============================

Set BootType% = 0 to perform a warm boot, or anything else to perform a
cold boot.

          --Joe in Bay Ridge, Brooklyn, NY, Wed, 04-07-1993--

... Beeeep!  This is a test of the emergency tagline system.
 X Blue Wave/QWK v2.12 X

--- Maximus 2.01wb
 * Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)
Outer Court
Echo Basic Postings

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