delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/04/23:21:43

From: Nate Eldredge <neldredge AT hmc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Rebooting the DOS Machine
Date: 04 Dec 2000 20:17:30 -0800
Organization: InterWorld Communications
Lines: 24
Sender: nate AT mercury DOT st DOT hmc DOT edu
Message-ID: <83lmtvpkmd.fsf@mercury.st.hmc.edu>
References: <3a2c3c1d DOT 33916309 AT news DOT connectnet DOT com>
NNTP-Posting-Host: mercury.st.hmc.edu
Mime-Version: 1.0
X-Trace: nntp1.interworld.net 975989850 72307 134.173.57.219 (5 Dec 2000 04:17:30 GMT)
X-Complaints-To: usenet AT news DOT interworld DOT net
NNTP-Posting-Date: Tue, 5 Dec 2000 04:17:30 +0000 (UTC)
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

jvasquez AT getntds DOT com (John Vasquez) writes:

> Using djgpp. How do I reboot the machine. I'm running in DOS.
> There must be a software interrupt that I can call that will reboot
> the maching, but I can't find it.

Jump to real-mode address F000:FFF0.  This code should do it:

#include <dpmi.h>

volatile void reboot(void)
{
        __dpmi_regs r; 
        r.x.cs = 0xf000;
        r.x.ip = 0xfff0;
        r.x.ss = r.x.sp = r.x.flags = 0;
        __dpmi_simulate_real_mode_procedure_retf(&r);
}


-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019