Skip to content

Instantly share code, notes, and snippets.

@andydude
Last active July 7, 2019 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andydude/3c599caa975f62bc886feb1b77133931 to your computer and use it in GitHub Desktop.
Save andydude/3c599caa975f62bc886feb1b77133931 to your computer and use it in GitHub Desktop.
First attempt at a master boot record.
[bits 16]
[org 0x7C00]
start:
cli
xor si,si
mov ss,si
mov sp,0x7DBE
popa
mov es,si
mov ax,0x201
int 0x13
jmp 0x0:0x7E00
times 0x1BC - ($-$$) db 0
mbr:
dw 0x7E00
dw 0x0180
dw 0x0001
dw 0x7F0B
dw 0xFDBF
dw 0x003F
dw 0x0000
dw 0x40C1
dw 0x005E
times 0x1FE - ($-$$) db 0
sig:
dw 0xAA55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment