2021-05-26 14:05:49 +00:00
|
|
|
[ORG 0x7c00]
|
2021-06-02 10:18:59 +00:00
|
|
|
jmp short start
|
2021-06-01 18:31:20 +00:00
|
|
|
nop
|
|
|
|
|
|
|
|
;Disk description table
|
|
|
|
db "EttinOS " ;Disk label
|
|
|
|
dw 0x200 ;Bytes per sector
|
|
|
|
db 0x1 ;Sectors per cluster
|
|
|
|
dw 0x1 ;Sectors reserved for the boot record
|
|
|
|
db 0x2 ;Number of copies of the FAT
|
|
|
|
dw 0xe0 ;Number of directory entries
|
|
|
|
dw 0xb40 ;Number of logical sectors
|
|
|
|
db 0xf0 ;Media descriptor type
|
|
|
|
dw 0x9 ;Sectors per FAT
|
|
|
|
dw 0x12 ;Sectors per track
|
|
|
|
dw 0x2 ;Number of heads
|
|
|
|
dd 0x0 ;Number of hidden sectors
|
|
|
|
dd 0x0 ;Number of LBA sectors
|
|
|
|
dw 0x0 ;Drive number
|
|
|
|
db 0x29 ;Drive signature
|
|
|
|
dd 0x0 ;Volume ID
|
|
|
|
db "EttinOS " ;Volume label
|
|
|
|
db "FAT12 " ;File system type
|
2021-05-30 16:12:19 +00:00
|
|
|
|
2021-05-26 14:05:49 +00:00
|
|
|
start:
|
|
|
|
|
2021-05-30 16:12:19 +00:00
|
|
|
;Initialise ds
|
|
|
|
mov ax, 0x0
|
|
|
|
mov ds, ax
|
|
|
|
|
2021-06-01 18:31:20 +00:00
|
|
|
;Load the system
|
2021-05-30 16:12:19 +00:00
|
|
|
;Set the source
|
2021-06-02 10:18:59 +00:00
|
|
|
mov dl, 0x0
|
2021-05-30 16:12:19 +00:00
|
|
|
mov dh, 0x0
|
|
|
|
mov ch, 0x0
|
|
|
|
mov cl, 0x2
|
|
|
|
;Set the destination
|
2021-05-26 14:05:49 +00:00
|
|
|
mov ax, 0x1000
|
|
|
|
mov es, ax
|
2021-06-02 15:13:12 +00:00
|
|
|
mov bx, 0x200
|
2021-05-30 16:12:19 +00:00
|
|
|
;Set the size
|
2021-05-26 15:25:56 +00:00
|
|
|
mov al, 0x20
|
2021-05-30 16:12:19 +00:00
|
|
|
;Load
|
2021-05-26 15:25:56 +00:00
|
|
|
mov ah, 0x2
|
2021-05-26 14:05:49 +00:00
|
|
|
int 0x13
|
|
|
|
|
2021-06-01 18:31:20 +00:00
|
|
|
;Boot the system
|
2021-06-02 15:13:12 +00:00
|
|
|
jmp 0x1000:0x200
|
2021-05-26 14:05:49 +00:00
|
|
|
|
2021-05-30 16:12:19 +00:00
|
|
|
;Padding
|
2021-05-26 15:25:56 +00:00
|
|
|
times 0x1fe-($-$$) db 0
|
2021-05-30 16:12:19 +00:00
|
|
|
|
|
|
|
;Boot signature
|
|
|
|
dw 0xaa55
|