At 12:05 AM 4/23/2004 -0300, Alain wrote: >Hi Michael, > >I am not sure that I understand what you said: > >1) I understand that _some_ old hardware had a reset bug (or wasit an old emm386?)
The original EMM386 used output to a port command to reset the PC on Ctrl-Alt-Del keypress. It never initialized the port value, so EMM386 just hit a random port on Ctrl-Alt-Del. If/when the OUT instruction didn't reboot the machine, EMM386 jumped to the original BIOS reboot address at FFFF:0 after taking itself out of protected mode and turning off memory mapping. Result is you're back to standard DOS mode as if EMM386 was no longer present on a reboot call. The boot might be warm, it might be cold, depends on what was set down in the BIOS data area prior to the reboot call. I had fixed the OUT command to make it hit the right port, so you consistently got a reboot within EMM386. The original EMM386 also commented out the command to flag BIOS to force a warm boot when using that port, with comments saying that warm boot wasn't safe to do. I don't know why it thought/thinks that, but originally left it alone. Just tonight, I turned back on the command to force a warm boot with Ctrl-Alt-Del (writes the value 1234h at BIOS data area 40:72h). Then I commented out the EMM386 port commands. With this change, EMM386 always turns off PM and all that stuff, then jumps to real mode FFFF:0 (the BIOS reboot address). Works fine on my machine, no Power On Self Test (POST) counting up of memory when I do the three-finger salute. Now, while EMM386 is running, all reboot jumps to the shadowed ROM address at FFFF:0 are routed by EMM386 to the real mode FFFF:0 after the PM/memory map shut-off. The PC will warm boot or cold boot depending on what the application making the call flagged in 40:72h. The current EMM386 version out there has the output to port command before that real mode jump to FFFF:0 to try and reboot within EMM386 first. What I have tonight doesn't try that. >2) I tested in real mode, just after the autoexec completed. BUT, from what you said >if a <CtrlAltDel> happens in protected mode, then it looks like a great idea making a >cold boot. BTW what if I am running a protected mode program that just switched to >realmode for an ISR or to access DOS? I'm not sure why it matters if the Ctrl-Alt-Del happens in protected mode application. The only difference I can detect between warm and cold boot is the cold boot has the POST memory check and resets the hardware, which is annoying to wait for when it isn't required. That's true in either real or protected mode. ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel