42 lines
514 B
NASM
42 lines
514 B
NASM
cpu 8086
|
|
|
|
%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
|
|
|
|
.retry: mov ax, 0x0208
|
|
mov cx, 2
|
|
mov dh, 0
|
|
mov bx, off
|
|
|
|
int 0x13
|
|
jc .retry
|
|
|
|
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
|