; DragonZap First Boot / Day 1. Educational example, MIT licence. bits 16 org 0x7c00 start: cli xor ax, ax mov ds, ax mov es, ax mov ss, ax mov sp, 0x7c00 sti cld mov ax, 0x0003 ; BIOS: clear screen, 80x25 text mode int 0x10 mov si, message .print: lodsb ; read one byte from DS:SI into AL test al, al ; zero marks the end of the message jz .halt mov ah, 0x0e ; BIOS: print the character in AL xor bx, bx ; display page 0 int 0x10 jmp .print .halt: cli hlt jmp .halt message db 'Hello from my first boot!', 0 times 510-($-$$) db 0 ; pad to the last two bytes dw 0xaa55 ; boot signature: bytes 55 AA