Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!fuug!funic!nntp.hut.fi!nntp!iisakkil From: iisakkil@vipunen.hut.fi (Mika R Iisakkila) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Program needed (how about warm boot?) Message-ID: Date: 4 Jun 91 20:27:16 GMT References: <1991Jun3.155821.10694@mcs.kent.edu> <1991Jun3.214720.2154@agora.rain.com> Sender: usenet@nntp.hut.fi (Usenet pseudouser id) Organization: Otaniemi Underground Broadcasting System Lines: 52 In-Reply-To: rickc@agora.rain.com's message of 3 Jun 91 21:47:20 GMT Nntp-Posting-Host: vipunen.hut.fi rickc@agora.rain.com (Rick Coates) writes: > This works, but it does a cold boot (reset). Does anyone out there know > the magic to cause a warm boot? It's the same thing, except if a certain Here's a small Turbo C program I wrote a long time ago. No assembler. #include #include #include void far (*boot)() = MK_FP(0xffff,0x0000); void usage(void) { puts("Usage: boot [/c] [/w]"); puts("Options: /c cold boot"); puts(" /w warm boot (default)"); exit(1); } main(int argc, char **argv) { char coldboot = 0; while(argc > 1) { switch(*argv[1]) { case '/': case '-': switch(argv[1][1]) { case 'c': case 'C': coldboot = 1; break; case 'w': case 'W': coldboot = 0; break; default: usage(); } break; default: usage(); } argc--; argv++; } *((unsigned int far *)(MK_FP(0x0040, 0x0072))) = coldboot ? 0 : 0x1234; boot(); }