Hi Paul,
> I was looking in BIOS interrupts info from: > http://www2.ift.ulaval.ca/~marchand/ift17583/dosints.pdf > INT 15 - AH = 89h SYSTEM - SWITCH TO VIRTUAL MODE (AT,XT286,PS50+) You can do that, but your problem is in the opposite direction: JEMMEX, JEMM386, EMM386 etc. have already switched to protected mode because this is necessary to provide UMB and EMS on modern hardware. Ancient hardware may additionally support hardware EMS. UMBPCI can be used to allocate UMB in areas above 640 kB which happen to be available on modern hardware according to the map. So you already are in protected mode when your BIOS blindly assumes you are not and activates protected mode again, which of course does not work. So EMM386 receives an exception and shows you an error message about the BIOS. > And that answered a bit of question to me, how can DOS > programs and BIOS cooperate with a common GDT table? See above, it does not solve the problem. Even if the BIOS would use that int 15 call to switch to protected mode, EMM386 would not be able to combine "BIOS wants to enter protected mode with specified GDT and IRQ mapping" with "EMM386 alreay needs those things to have different values", so it would not help if EMM386 itself provides an alternative version of int 15 so the BIOS can call that. The other way round does not help either: EMM386 could use this call to switch to protected mode, but the result would be the same as what you already have: The system is in protected mode and has to stay here while EMM386 is active. So when you now ask your BIOS to do something which makes your (unusual!) BIOS "switch from real mode to protected mode" without looking at where it came from, it would try to switch from protected mode to protected mode and fail, as it already does now. The only difference could be that if you use the BIOS call to switch to protected mode, the BIOS could take a "mental note" and remember that you already ARE in protected mode. And stop attempts to switch to protected mode later. I am pessimistic about that. Unless you have very good reasons to load EMM386, please focus on other problems first and simply skip loading EMM386 on your system. That way, the system will stay in real mode and will have no problems when your BIOS switches it to protected mode temporarily :-) HIMEM and XMGR style drivers will not keep the system in protected mode non-stop: They only use protected mode during the moments when you access XMS contents. AND they even are polite enough to let the BIOS do the access when they detect that protected mode already is in use, as far as I remember :-) > Maybe I could try to hack something about it... not sure I am good enough to > do it. Sorry but given that my best guess is that you have misunderstood the problem, you are not yet an experienced JEMMEX programmer. Again, I ask you to use the "do not load EMM386" workaround for now. If the topic is REALLY exciting for you, you can start by learning how to use the protected mode features 386SWAT, IDEBUG or other advanced debugging tools which let you trace across real and protected modes: real mode, vm86 mode, protected mode to understand what your BIOS is doing, or even how the internal workings of EMM386 are. But I warn you, those are quite complex. So please focus on the other questions instead: What is your e820 memory map if you boot into plain DOS without EMM386? Does it reserve a block at linear address 58000? If you use my manual MCB edit trick, will more DOS apps work without a crash? Which apps will keep crashing nevertheless? Those are exciting questions which do not require the extreme skill level of debugging protected mode usage conflicts which you can easily avoid anyway by NOT loading EMM386 and JEMMEX. Note that this is mostly of academic interest: NORMAL people would just assume that if 5800:0 is reserved, the BIOS does not cooperate sufficiently with DOS. They would install Linux or Windows as next step and run DOS inside dosemu2 or dosbox. But given my interest in "DOS on too modern hardware" and your interest in challenges, I suggest that you keep doing some experiments. NOT protected mode ones, though: Those should wait for a later moment in learning low-level programming. So I ask you to not spend too much time with 386SWAT and the combined extreme complexities of "BIOS versus JEMMEX", but I cannot resist mentioning http://www.sudleyplace.com/swat/ already. Do NOT use that ;-) Instead, read the e820 memory map in DOS (if you find no tool for it, do it by hand using DEBUG) and try that "reserve 5800:0 block" MCB trick if it turns out the 5800:0 really is reserved in plain DOS without loading (J) EMM386 or JEMMEX. Big chance that it is reserved. Thanks! Regards, Eric _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel