rdos/boot/mbr.asm

42 lines
514 B
NASM
Raw Normal View History

cpu 8086
2020-04-30 20:22:14 +02:00
2021-12-16 13:27:23 +01:00
%define seg 0
%define off 0x700
org 0x7C00 - (seg << 4)
init: cli
mov ax, seg
mov ds, ax
mov es, ax
mov ss, ax
xor sp, sp
mov ax, sp
push ax
2021-02-18 20:38:42 +01:00
.retry: mov ax, 0x0208
mov cx, 2
mov dh, 0
2021-12-16 13:27:23 +01:00
mov bx, off
int 0x13
jc .retry
2021-12-16 13:27:23 +01:00
jmp seg:off
times (0x1BE - ($-$$)) db 0
; assumes 16 heads, 63 sectors per track
; image of 1.44 MB floppy starting on 2nd track
part1: db 0x80
db 1, 1, 0
db 1
db 0xFF, 0xFF, 0xFF
dd 63
dd 0xb40
times (0x1FE - ($-$$)) db 0
; Boot signature
sig: dw 0xAA55