Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This is the first stage of the boot loader. This file's compiled binary is
- ; meant to be burned to the first sector of the boot disk. Do not do ANYTHING
- ; else to it, or otherwise, you will completely break the system.
- JMP WORD BEGIN
- NOP
- ; BIOS Parameter Block
- BPBOEM DB "MY-OS "
- BPBBPS DW 512
- BPBSPC DB 1
- BPBRSE DW 1
- BPBFATS DB 2
- BPBNIRS DW 224
- BPBTLS DW 2000
- BPBMDT DB 240
- BPBSPFAT DW 9
- BPBSPT DW 18
- BPBHOS DW 2
- BPBHS DD 0
- BPBLASOM DD 0
- ; Extended BIOS Parameter Block
- EXBPBDN DB 0
- EXBPBFLAGS DB 0
- EXBPBSIGN DB 29h
- EXBPBVOLID DD 0
- EXBPBVOL DB "MY-OS "
- EXBPBFILESYS DB "FAT12 "
- BEGIN:
- MOV AX, 31744
- CLI
- MOV SS, AX
- MOV SP, 2048
- STI
- MOV DS, AX
- MOV ES, AX
- MOV FS, AX
- MOV GS, AX
- HLT
- JMP $
- ; Set emptry bytes to null
- TIMES 01FEh - ($ - $$) DB 00h
- ; Boot sector 'signature'
- DB 85
- DB 170
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement