
BIOS vs UEFI Booting for Hobby OS Developers
Choose between legacy BIOS and UEFI for a hobby OS by comparing the CPU mode at entry, boot media, memory map, graphics and tooling, with a decision table.
Tag
12 posts

Choose between legacy BIOS and UEFI for a hobby OS by comparing the CPU mode at entry, boot media, memory map, graphics and tooling, with a decision table.

Decode the 512-byte master boot record field by field, from 446 bytes of boot code to four 16-byte partition entries and the 0xAA55 signature, with xxd output.

Print strings and hex values in 16-bit real mode with BIOS int 0x10, using teletype function 0x0E and write-string function 0x13, in reusable NASM routines.

Boot a 512-byte boot sector in QEMU 9 with a raw drive option, then attach GDB to the emulated CPU to break at 0x7C00 and step real-mode instructions.

Write a 512-byte boot sector in NASM that sets up segments and a stack, prints a string with BIOS int 0x10 and ends with the 0xAA55 signature, line by line.

Write, assemble and link a complete x86-64 program with NASM on Linux. It prints a line, exits with a status code, and uses no C library at all.

Put code, constants, variables and zeroed buffers into the right ELF sections in NASM and GNU as, and see how segments and permissions follow from them.

Define bytes, words, strings, floats, arrays and zeroed buffers in NASM with db, dw, dd, dq, the res family and times, with exact little-endian layouts.

Build the same NASM program two ways on Linux x86-64: a freestanding _start binary linked with ld, and a main function linked with gcc against libc.

Choose an x86 assembler by platform, syntax, macro power and output formats. A decision table compares NASM, GNU as, MASM and FASM, with when not to pick each.

Build an x86 bootloader in NASM from a 512-byte boot sector to a loaded kernel, covering disk reads, A20, the memory map, protected mode and long mode.

A full guide to x86 assembler syntax: Intel and AT&T operand order, NASM and GNU as directives, addressing modes, sections, macros, linking and porting.