; NASM x86 Floppy Bootblock "Hello, world!" ; written 2007-03-17 by Dirk Jagdmann ; https://www.cubic.org/source/bootblock.asm ; ; to assemble this do something like: ; nasm -f bin -o bootblock.bin bootblock.asm ; then write it to a floppy (on UN*X style systems): ; dd if=bootblock.bin of=/dev/fd0 ; or create a floppy image to use in VMware or similar: ; dd if=/dev/zero of=bootblock.img bs=1024 count=1440 ; dd if=bootblock.bin of=bootblock.img conv=notrunc org 0h start: ; reset VGA mov ax, 0003h int 10h ; write string mov ax, 7C0H ; segment setup mov es, ax mov bp, msg ; msg pointer mov ax, 1300h ; ah=function, al=write mode mov bx, 000Fh ; bh=page, bl=attribute mov cx, 13 ; number of chars mov dx, 0C23h ; dh=row, dl=column int 10h ; wait for key xor ax, ax int 16h ; reset int 19h jmp 0xF000:0xFFF0 msg: db "Hello, world!"