2020-07-04 10:35:38 +02:00
|
|
|
cpu 8086
|
2020-09-15 21:44:32 +02:00
|
|
|
org 0x7C00
|
2020-04-15 00:17:58 +02:00
|
|
|
|
2020-07-04 10:35:38 +02:00
|
|
|
%include "inc/bpb.asm"
|
2020-09-15 21:44:32 +02:00
|
|
|
%include "inc/mbr.asm"
|
2020-10-13 22:10:23 +02:00
|
|
|
%include "inc/fcb.asm"
|
2020-10-25 00:50:23 +02:00
|
|
|
%include "inc/dpt.asm"
|
2020-04-15 00:17:58 +02:00
|
|
|
|
2020-09-15 21:44:32 +02:00
|
|
|
; kernel stack size in words
|
|
|
|
%define stacksize 512
|
2020-08-31 22:11:05 +02:00
|
|
|
|
2020-07-04 10:35:38 +02:00
|
|
|
init: cli
|
|
|
|
xor ax, ax
|
|
|
|
mov ds, ax
|
|
|
|
mov es, ax
|
|
|
|
mov ss, ax
|
|
|
|
mov sp, ( stack+stacksize )
|
2020-04-26 23:14:34 +02:00
|
|
|
|
2020-09-27 17:45:19 +02:00
|
|
|
print_banner: mov si, banner
|
|
|
|
mov ah, 0x0e
|
|
|
|
xor bx, bx
|
|
|
|
.loop: lodsb
|
|
|
|
int 0x10
|
|
|
|
cmp al, 0x0D
|
|
|
|
jnz .loop
|
2020-08-27 22:52:16 +02:00
|
|
|
|
2020-10-13 22:10:23 +02:00
|
|
|
cmp dl, 0x80
|
|
|
|
jc .k
|
|
|
|
sub dl, (0x80-2)
|
|
|
|
.k: mov [defdrv], dl
|
|
|
|
|
2020-10-11 23:33:01 +02:00
|
|
|
call dskrst
|
|
|
|
|
2020-10-13 22:10:23 +02:00
|
|
|
mov bx, testfcb
|
|
|
|
call fcbfst
|
2020-10-11 23:33:01 +02:00
|
|
|
|
2020-09-15 21:44:32 +02:00
|
|
|
hlt: hlt
|
|
|
|
jmp hlt
|
2020-04-20 19:13:06 +02:00
|
|
|
|
2020-10-25 00:50:23 +02:00
|
|
|
%include "kernel/far.asm"
|
2020-10-13 22:10:23 +02:00
|
|
|
%include "kernel/fcb.asm"
|
|
|
|
%include "kernel/drive.asm"
|
|
|
|
|
|
|
|
section .data
|
|
|
|
|
2020-10-11 23:33:01 +02:00
|
|
|
%defstr VERSIONSTR VERSION
|
|
|
|
banner: db "RDOS ", VERSIONSTR, 0x0A, 0x0D
|
2020-09-17 07:57:46 +02:00
|
|
|
|
2020-10-13 22:10:23 +02:00
|
|
|
testfcb: db 0
|
|
|
|
db "HELLO ", "COM"
|
|
|
|
times 30 db 0
|
2020-09-17 07:57:46 +02:00
|
|
|
|
2020-04-23 21:36:20 +02:00
|
|
|
section .bss
|
2020-09-15 21:44:32 +02:00
|
|
|
|
|
|
|
stack: resb stacksize
|