3 ms·
You can absolutely leave long mode once entered; it's just annoying and silly. In fact one of the plausible options for running a DOS on UEFI would be downgradi
by leeter 5y ago
You can absolutely leave long mode once entered; it's just annoying and silly. In fact one of the plausible options for running a DOS on UEFI would be downgrading the mode to 'unreal' mode. But you'd still have to put BIOS replacement code in memory to manage that part.
However the better option IMO is to allow the DOS kernel to just virtualize the applications using the virtualization extensions on almost all modern CPUs. Then you could do something like adding an emu.ini file next to the exe/com that sets things like memory and emulated hardware settings.
Furthermore virtual machine BIOS code already exists for things like qemu etc. so there is a place to start on that too.
- zozbot234 5y ago> Then you could do something like adding an emu.ini file next to the exe/com that sets things like memory and emulated hardware settings. The standard DOS-extender feature for setting these modes is a Program Information File (.PIF extension).
- leeter 5y agoHonestly I was thinking similar but not exactly the same. More something with a VT-d memory map/port map so that the DOS application could potentially directly interface with legacy hardware without interfering or making the PIF incompatible. This has applications particularly in factories where they still use ISA interface cards with tooling etc. At the same time it would allow setting things like EGA/CGA compatibility requirements. Could you do it in the PIF? Probably, but I'd rather not risk breaking compatibility if possible. It's an idea only and would require research anyway assuming I actually had the time and energy to implement.
- anthk 5y agoJust boot BiEFIrcate from UEFI and chainload FreeDOS from there. https://github.com/tkchia/biefircate https://github.com/tkchia/biefircate