Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
529 B
2
Indexable
Never
//BOOTLOADER THAT DOES NOTHING

BITS 16
ORG 0x7C00
JMP $
TIMES 510 - ($ - $$) db 0
DW 0xAA55

compile: nasm bootloa1.asm -f bin -o boot.bin
run: qemu-system-x86_64-drive file=boot.bin,index=0,media=disk,format=raw

---------------------------------------------------------------------------

//BOOTLOADER TO PRINT SOMETHING

BITS 16
ORG 0x7C00
BOOT:
    MOV S1,Hello
    MOV AH,0x0E
.LOOP
    LODSB
    OR AL,AL
    JZ HALT
    INT 0x10
    JMP .LOOP
HALT:
    CLI
    HLT
Hello: DB "PRINTS",0
TIMES 510 - ($ - $$) DB 0
DW 0xAA55