Date: Tue, 08 Jul 1997 10:01:17 +0000 From: Bill Currie Subject: Re: CWSDPMI halting interrupt 19 (reboot) To: Nate Eldredge Cc: James MacDonald , djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <33C20FED.5443@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <199707051506 DOT IAA24406 AT adit DOT ap DOT net> Precedence: bulk Nate Eldredge wrote: > > At 07:28 7/4/1997 +0100, you wrote: > >In message <199707041814 DOT LAA22009 AT adit DOT ap DOT net>, Nate Eldredge > > wrote : > >>So perhaps INT 19 is not the best way to reboot. Other solutions: > >>The standard way to reboot has always been a real-mode jump to F000h:FFF0h. > >>For a warm boot, store 1234h at 0040h:0072h first; for a cold boot, store > 0000h. > > >Well, how do you do that from C? > >I don't want to use TASM. > > How about this (untested)? [code snipped] Or this (takes care of buggy bioses, so long as windows doesn't trap it). #include void reboot(void) { int k; outportb(0x3f2,0x00); outportb(0x64,0xfe); for (k=0; k<4000; k++); outportb(0x64,0xff); asm("cli;hlt"); } Bill -- Leave others their otherness.