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