54 lines
728 B
NASM
54 lines
728 B
NASM
cpu 8086
|
|
org 0x7C00
|
|
|
|
%include "inc/bpb.asm"
|
|
%include "inc/mbr.asm"
|
|
%include "inc/fcb.asm"
|
|
|
|
; kernel stack size in words
|
|
%define stacksize 512
|
|
|
|
init: cli
|
|
xor ax, ax
|
|
mov ds, ax
|
|
mov es, ax
|
|
mov ss, ax
|
|
mov sp, ( stack+stacksize )
|
|
|
|
print_banner: mov si, banner
|
|
mov ah, 0x0e
|
|
xor bx, bx
|
|
.loop: lodsb
|
|
int 0x10
|
|
cmp al, 0x0D
|
|
jnz .loop
|
|
|
|
cmp dl, 0x80
|
|
jc .k
|
|
sub dl, (0x80-2)
|
|
.k: mov [defdrv], dl
|
|
|
|
call dskrst
|
|
|
|
mov bx, testfcb
|
|
call fcbfst
|
|
|
|
hlt: hlt
|
|
jmp hlt
|
|
|
|
%include "kernel/fcb.asm"
|
|
%include "kernel/drive.asm"
|
|
|
|
section .data
|
|
|
|
%defstr VERSIONSTR VERSION
|
|
banner: db "RDOS ", VERSIONSTR, 0x0A, 0x0D
|
|
|
|
testfcb: db 0
|
|
db "HELLO ", "COM"
|
|
times 30 db 0
|
|
|
|
section .bss
|
|
|
|
stack: resb stacksize
|