PC Boot Sector When booting a PC the BIOS (real mode 16-bits) routine reads sector 0 from the booted media. If the sector ends with the sinature AA55h, the pc recogizes it as a boot sector. The content of the boot sector is loaded into memory at address 7C00h. This small program that fits on the bootsector prints the string 'Hello World!' on the screen of the pc and then halts execution of the code. The program is written in NASM on a Linux system. Then written to a floppy disk at sector 0. [org 0x7c00] [bits 16] start: cli xor ax, ax mov ss, ax mov ds, ax mov es, ax mov sp, 0x7c00 sti mov si, msg call print hlt print: lodsb cmp al, 0 je p_end mov ah, 0x0e int 0x10 jmp print p_end: ret msg db 'Hello World!', 0 times 510 - ($-$$) db 0 dw 0xaa55 To assemble the program into a binary file execute the following line: $ nasm -f bin boot.asm -o boot.bin Then create an empty floppy image: $ dd if=/dev/zero of=floppy.img bs=512 count=2880 Then copy the boot sector onto the floppy image: $ dd if=boot.bin of=floppy.img conv=notrunc