Path: utzoo!attcan!uunet!cs.utexas.edu!asuvax!ncar!umigw!mthvax!mathrich From: mathrich@mthvax.cs.miami.edu (Rich Winkel) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: How to do a warm-boot from a C program Message-ID: <1990Feb20.175748.20496@mthvax.cs.miami.edu> Date: 20 Feb 90 17:57:48 GMT References: <2028@milton.acs.washington.edu>

Organization: U of Miami Dept. of Math. and Computer Science, Coral Gables, FL 33124 Lines: 33 In article <90050.231645JXS118@psuvm.psu.edu> JXS118@psuvm.psu.edu (Jeff Siegel, Op from Atherton Hall) writes: >In article >> >>jimmy writes: >>>Does anyone know how to do a boot from a C program? >> >>Yes, just do an Interrupt 25 (which is 19h). That will do it nicely. >Sorry, but my first reaction is NO ! NO ! NO ! >This is a seems to be a common misconception. Int 19h is too buggy on >most machines that I've seen. It won't reset any hardware registers >that may have been mucked with. It alsowill fail (mostly) if you have >multiple-page-tracking-type EMM drivers installed. Your best bet for a reboot >is to far jump to addresss FFFF:0000. This will cause the almost-equivalent >of pressing the resest button (provided you have one.) However, this invokes >the memory test (usually lengthy). To exactly mimick a CTRL-ALT-DEL, you must >write hex word 1234 into some special address in the bios data areas (it is >listed in Norton, i don't remeber what the address is.) and then do the far >jump. The address is 0x40:0x72. INT 19h isn't buggy .. it wasn't designed to do a reset. All it's supposed to do is load the boot sector off the first disk it can find and put it at an absolute location (0:7C00, I think) in memory. It doesn't know anything about TSR's, re-directed int vectors or anything else that could trip it up. It's supposed to be called by the system reset routine, which has already taken care of all that stuff. There is no interrupt vector which points to the system reset routine. As mentioned above, the way to do a reset is to jump to FFFF:0000. This is in fact what the cpu is wired to do at power on. Rich