Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!uwvax!uwmacc!uwmcsd1!marque!ddsw1!gryphon!greg From: greg@gryphon.CTS.COM (Greg Laskin) Newsgroups: comp.sys.ibm.pc Subject: Re: Switching from Protected to Real Mode Message-ID: <1309@gryphon.CTS.COM> Date: Sun, 23-Aug-87 08:16:56 EDT Article-I.D.: gryphon.1309 Posted: Sun Aug 23 08:16:56 1987 Date-Received: Sun, 23-Aug-87 22:34:00 EDT References: <1387@imagen.UUCP> <3351@zen.berkeley.edu> Reply-To: greg@gryphon.CTS.COM (Greg Laskin) Organization: Trailing Edge Technology, Redondo Beach, CA Lines: 33 Keywords: 286 In article <3351@zen.berkeley.edu> iverson@cory.Berkeley.EDU.UUCP (Tim Iverson) writes: >In article <1387@imagen.UUCP> geof@imagen.UUCP (Geoffrey Cooper) writes: >>Is there a way (I deduce from recent net messages that there is) for a >>program to switch from 286 protected mode back to real address mode, >>without rebooting the machine? > >To answer the question; yes, there is. If you want details, look >in *any* '286 manual, or there is a BIOS call that will do this - >you can find it in the AT Technical Reference Manual. > > The IBM Bios performs this trick in the block move routine than allows copying memory across the 1MB boundary. The routine saves the state of the processor and sets up a protected mode environment and sets a bit in the CMOS ram before jamming the CPU into protected mode. To get out of protected mode the routine RESETS the processor by asserting its RESET line. This brings the processor back to real address mode and trys to reboot the machine. Remember the bit in the CMOS ram. Right, the cold boot routine checks for that bit and if it's set it jumps back to the block move bios routine which then restores the processor state and resumes processing. I believe the segmentation used by the BIOS rom prevents it being called from protected mode. -- Greg Laskin "When everybody's talking and nobody's listening, how can we decide?" INTERNET: greg@gryphon.CTS.COM UUCP: {hplabs!hp-sdd, sdcsvax, ihnp4}!crash!gryphon!greg UUCP: {philabs, scgvaxd}!cadovax!gryphon!greg