Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc05!hpgva1!hpuamsa!steves From: steves@hpuamsa.neth.hp.com (Steve South CRC) Newsgroups: comp.os.msdos.programmer Subject: Re: Protected mode/Real mode switching Message-ID: <27540001@hpuamsa.neth.hp.com> Date: 23 Apr 91 12:00:07 GMT References: <1991Apr15.160333.8107@msuinfo.cl.msu.edu> Organization: HP-Sales Office-The Netherlands Lines: 31 I was just looking through the HP Vectra 286/386 BIOS Technical Reference manual (HP Part No. 5959-7745) which does give *some* information about this. There is nothing plastered over the manual to suggest it is HP confidential so I guess yu could get a copy. I don't know how generic the information is though. To summarise the manual, as the previous reponses indicated, the only way to get from protected mode to real mode is to do a processor reset. From software this may be done by getting the 8042 keyboard controller to toggle the 80286 reset line, or by doing a jump to FFFFFFF0h. The question now arises for the BIOS "is this a power up, or is it a return from protected mode?" On the Vectra the BIOS looks at CMOS addres 0Fh, which is the shutdown status byte. I don't know whether this value is set by the BIOS when protected mode is entered, or if you must do it yourself. I would *guess* the former. As far as entering protected mode is concerned, you need INT15h with AH=89h. From here on it gets beyond my knowledge of 80286. One point though. The aforementioned manual says that address line A20 must be released prior to entering protected mode, and it is your program's responsibility to do this by issuing the approriate command to the 8042 keyboard controller. I wish you the best of luck..... Steve South. HP Analytical Response Centre. Amstelveen, Netherlands. ---------------------------------------------------------------------------- #include ----------------------------------------------------------------------------