1
0
Fork
You've already forked amode
0
A MS-DOS protected mode extender
  • C 62.2%
  • Assembly 21.5%
  • Meson 7.1%
  • Shell 6.3%
  • Linker Script 2.9%
2026年06月18日 16:03:38 +03:00
cross Initial commit 2026年06月18日 14:27:56 +03:00
include Fix block comments 2026年06月18日 15:37:55 +03:00
loader Bound external payload loading 2026年06月18日 15:38:14 +03:00
runtime Fix block comments 2026年06月18日 15:37:55 +03:00
scripts Initial commit 2026年06月18日 14:27:56 +03:00
test Fix block comments 2026年06月18日 15:37:55 +03:00
tools Validate ELF table geometry 2026年06月18日 15:37:55 +03:00
.gitignore Initial commit 2026年06月18日 14:27:56 +03:00
meson.build meson: expose runtime sources as files() for subproject consumers 2026年06月18日 16:03:38 +03:00
README.md Initial commit 2026年06月18日 14:27:56 +03:00

AMODE

AMODE boots a flat protected-mode payload from a DOS .COM or .EXE file.

Boot flow

  1. DOS loads the .COM/.EXE; the real-mode stub (loader/boot.S) enables A20, sets up an unreal-mode DS (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.
  2. Control transfers to the payload entry (runtime/start.S): it patches the GDT with the computed load base, optionally runs real-mode load_assets(), switches to protected mode, and calls the payload's cmain().
  3. The PM runtime (runtime/sys.c, API in include/amode.h) provides PIC remap, an IDT, a 100 Hz PIT tick, keyboard, IRQ dispatch (IRQ 2–7 for consumers; 0/1 reserved), and dos_exit() to return cleanly to DOS.

License

AMODE is licensed under MIT. See LICENSE for more information.