A MS-DOS protected mode extender
| cross | Initial commit | |
| include | Fix block comments | |
| loader | Bound external payload loading | |
| runtime | Fix block comments | |
| scripts | Initial commit | |
| test | Fix block comments | |
| tools | Validate ELF table geometry | |
| .gitignore | Initial commit | |
| meson.build | meson: expose runtime sources as files() for subproject consumers | |
| README.md | Initial commit | |
AMODE
AMODE boots a flat protected-mode payload from a DOS .COM or .EXE file.
Boot flow
- DOS loads the
.COM/.EXE; the real-mode stub (loader/boot.S) enables A20, sets up an unreal-modeDS(4 GiB limit) so it can address the full payload, then calls the a.out loader (loader/aout_dos.c) which copies the text segment and adds the physical load base to every relocation site. - Control transfers to the payload entry (
runtime/start.S): it patches the GDT with the computed load base, optionally runs real-modeload_assets(), switches to protected mode, and calls the payload'scmain(). - The PM runtime (
runtime/sys.c, API ininclude/amode.h) provides PIC remap, an IDT, a 100 Hz PIT tick, keyboard, IRQ dispatch (IRQ 2–7 for consumers; 0/1 reserved), anddos_exit()to return cleanly to DOS.
License
AMODE is licensed under MIT. See LICENSE for more information.