Date: Tue, 26 Sep 2000 06:37:58 +0530 Message-Id: <200009260107.GAA01063@midpec.com> From: Prashant TR To: jbfraleigh AT my-deja DOT com CC: djgpp AT delorie DOT com In-reply-to: <8qnrgc$n8b$1@nnrp1.deja.com> (jbfraleigh@my-deja.com) Subject: Re: Rebooting the PC References: <8qnrgc$n8b$1 AT nnrp1 DOT deja DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk | From: jbfraleigh AT my-deja DOT com | Date: Mon, 25 Sep 2000 15:37:51 GMT | DJ-Gateway: from newsgroup comp.os.msdos.djgpp | | I'm using GCC/DJGPP and I'd like to reboot the PC. I've tried the | following methods: | | 1) int 0x19 This is not a good idea. Some programs hook this interrupt. | 2) outportb(0xCF9, 4); | outportb(0xCF9, 2); Why would you want to write to the PCI bus? | | 3) void (*rebooter)(); | rebooter = (void *) (0x00000000); | (*rebooter)(); Again, not a good idea for protected mode programs. In real mode, this would be perfect. You can try this one: outportb (0x61, 0xfe); It resets the CPU. -- Prashant TR Web: http://www.midpec.com/