After boot, the stage2 code waits for a keypress via BIOS INT 0x16 (AH=0) and then calls a small VGA text routine that clears the entire 80×25 text buffer at physical address 0xB800:0000 using an efficient rep stosw, computes the top-right start column as 80 − strlen(“hello world”) = 69, and writes the NUL-terminated string “hello world” there character-by-character using lodsb/stosw with AH set to 0x0C (bright red attribute); the routine preserves registers (push/pop AX, CX, DI, ES) and the build system adds a qemu-run CMake target that runs qemu-system-x86_64 with the exact command to boot the generated floppy image.
Log in to leave a comment