x86_fat12bs/README.md

19 lines
790 B
Markdown
Raw Permalink Normal View History

2018-11-08 03:41:59 +00:00
2018-11-08 03:47:11 +00:00
### Summary
2018-11-08 03:46:36 +00:00
Stage 1 loader loads stage 2 loader from the floppy and jumps to it.
2018-11-09 05:28:00 +00:00
Stage 2 loader initializes protected mode, detects system memory, loads stage 3 and kernel from the floppy and jumps to stage 3.
Stage 3 is supposed perform initialization in protected mode. It should be called stage 2.5 because it's the same thing but 32 bit binary, it reloads GDT to predictable range, initializes IDT, tests #DIV exception and and eventually jumps to kernel.
The kernel prints a welcome message and loops infinitely.
2018-11-08 03:46:36 +00:00
2018-11-08 04:03:29 +00:00
Yes the ASM code and the makefile could use some refactoring. Yes I know floor can be calculated simply by (x + y - 1) / y.
2018-11-08 03:47:59 +00:00
2018-11-08 03:47:11 +00:00
### Building
2018-11-09 05:24:52 +00:00
cd into "src" and Run "make".
2018-11-08 03:41:59 +00:00
2018-11-09 05:24:52 +00:00
The boot image "boot.img" is generated under "src/out" directory.
2018-11-08 03:41:59 +00:00
Use QEMU or Bochs to emulate.