2019-04-20 23:02:35 +02:00
|
|
|
cpu 8086
|
2019-09-08 17:18:37 +02:00
|
|
|
|
2019-10-15 22:19:55 +02:00
|
|
|
self: equ 0xF000
|
|
|
|
diskbuf: equ (self-0x200) ; deblocking
|
|
|
|
stack: equ (diskbuf) ; grows down
|
|
|
|
defdrv: equ 4
|
2019-09-29 23:25:29 +02:00
|
|
|
|
2019-09-29 10:52:00 +02:00
|
|
|
org self
|
|
|
|
jmp init
|
2019-10-15 22:19:55 +02:00
|
|
|
pad 3
|
|
|
|
|
|
|
|
self_offset:
|
|
|
|
db (self >> 8)
|
2019-09-06 00:24:39 +02:00
|
|
|
|
2019-09-29 10:52:00 +02:00
|
|
|
banner:
|
2019-10-08 21:53:41 +02:00
|
|
|
db "RDOS 2019-09", 0x0A, 0x0D, '$', 0
|
2019-09-19 22:02:16 +02:00
|
|
|
|
2019-09-10 23:38:52 +02:00
|
|
|
init:
|
2019-09-29 10:52:00 +02:00
|
|
|
mov sp, stack
|
2019-10-15 22:19:55 +02:00
|
|
|
mov byte [defdrv], 0x01
|
2019-09-08 17:18:37 +02:00
|
|
|
|
2019-10-08 21:53:41 +02:00
|
|
|
mov dx, banner
|
|
|
|
call print_string
|
2019-09-29 14:23:39 +02:00
|
|
|
|
2019-10-20 11:56:27 +02:00
|
|
|
call disk_parm_init
|
|
|
|
|
|
|
|
mov dl, 0x00
|
|
|
|
call disk_select
|
2019-09-10 23:38:52 +02:00
|
|
|
|
|
|
|
cli
|
|
|
|
.halt:
|
|
|
|
hlt
|
|
|
|
jmp .halt
|
2019-09-06 00:24:39 +02:00
|
|
|
|
2019-09-29 14:23:39 +02:00
|
|
|
init_program:
|
|
|
|
db "HELLO.COM", 0
|
|
|
|
|
2019-09-29 10:52:00 +02:00
|
|
|
cpm_syscall:
|
2019-10-08 21:53:41 +02:00
|
|
|
cmp cl, 0
|
|
|
|
je init
|
|
|
|
cmp cl, 1
|
|
|
|
je console_input
|
|
|
|
cmp cl, 2
|
|
|
|
je console_output
|
|
|
|
cmp cl, 9
|
|
|
|
je print_string
|
|
|
|
cmp cl, 10
|
|
|
|
je read_buffer
|
2019-09-29 10:52:00 +02:00
|
|
|
stc
|
|
|
|
ret
|
|
|
|
|
2019-10-08 21:53:41 +02:00
|
|
|
%include "char.asm"
|
2019-09-29 10:52:00 +02:00
|
|
|
|
2019-09-29 14:23:39 +02:00
|
|
|
%include "exec.asm"
|
2019-10-16 23:09:31 +02:00
|
|
|
%include "fdc.asm"
|
2019-09-29 14:23:39 +02:00
|
|
|
%include "fcb.asm"
|
2019-10-08 19:54:39 +02:00
|
|
|
%include "fcbparse.asm"
|
2019-10-20 11:56:27 +02:00
|
|
|
%include "disk.asm"
|
2019-10-08 19:54:39 +02:00
|
|
|
%include "log2.asm"
|
2019-10-12 20:33:26 +02:00
|
|
|
%include "dump.asm"
|