Split up kernel and debug rom
This commit is contained in:
parent
4fa383bb2e
commit
11b4d07dc1
4 changed files with 240 additions and 54 deletions
|
@ -1,15 +1,29 @@
|
|||
cpu 8086
|
||||
org 0x0000
|
||||
rom:
|
||||
db 0x55, 0xAA
|
||||
optrom_length:
|
||||
.sectors:
|
||||
db 0x00
|
||||
jmp optrom_init
|
||||
.init:
|
||||
push cs
|
||||
pop es
|
||||
|
||||
; reserved area
|
||||
times (0x1A - ($-$$)) db 0
|
||||
mov di, start
|
||||
mov ax, 0x18
|
||||
call intr_register
|
||||
|
||||
retf
|
||||
.name:
|
||||
db "ROM DOS", 0
|
||||
|
||||
times (0x18 - ($-$$)) db 0
|
||||
.pcir_ptr:
|
||||
dw 0
|
||||
|
||||
times (0x1A - ($-$$)) db 0
|
||||
.pnp_ptr:
|
||||
dw pnp
|
||||
|
||||
align 16
|
||||
pnp:
|
||||
db "$PnP"
|
||||
.version:
|
||||
|
@ -21,8 +35,8 @@ pnp:
|
|||
.checksum:
|
||||
db 0 ; checksum (filled by fix-rom)
|
||||
dd 0 ; device identifier
|
||||
dw str_vendor ; manufacturer string
|
||||
dw str_product ; product name string
|
||||
dw 0 ; manufacturer string
|
||||
dw rom.name ; product name string
|
||||
db 0,0,0 ; device type string
|
||||
db 0x20 ; device indicator, bit for "read cacheable" set
|
||||
dw 0 ; boot connection vector
|
||||
|
@ -31,40 +45,6 @@ pnp:
|
|||
dw 0 ; reserved
|
||||
dw 0
|
||||
|
||||
str_vendor:
|
||||
db "Nero", 0
|
||||
str_product:
|
||||
db "Nero DOS ", 60, 234, 62, 0
|
||||
|
||||
optrom_init:
|
||||
push cs
|
||||
pop es
|
||||
|
||||
mov di, isr_debug
|
||||
mov ax, 0x1
|
||||
call intr_register
|
||||
mov ax, 0x3
|
||||
call intr_register
|
||||
|
||||
mov di, start
|
||||
mov ax, 0x18
|
||||
call intr_register
|
||||
|
||||
retf
|
||||
|
||||
announce:
|
||||
push ds
|
||||
push cs
|
||||
push cs
|
||||
pop ds
|
||||
mov ax, str_product
|
||||
push ax
|
||||
call printf
|
||||
db "%S (CS=%Xh)", 0x0A, 0x0D, 0x00
|
||||
add sp, 4
|
||||
pop ds
|
||||
ret
|
||||
|
||||
start:
|
||||
xor ax, ax
|
||||
mov ds, ax
|
||||
|
@ -73,8 +53,6 @@ start:
|
|||
mov sp, 0x800
|
||||
mov di, sp
|
||||
|
||||
call announce
|
||||
|
||||
call drvtab_create
|
||||
|
||||
push cs
|
||||
|
@ -86,6 +64,7 @@ start:
|
|||
.loop:
|
||||
mov ah, 0x01
|
||||
int 0x21
|
||||
int3
|
||||
jmp .loop
|
||||
|
||||
cli
|
||||
|
@ -112,9 +91,4 @@ isr_return:
|
|||
|
||||
%include "chario.asm"
|
||||
|
||||
%include "printf.inc"
|
||||
%include "print.asm"
|
||||
|
||||
%include "debug.asm"
|
||||
|
||||
align 512
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue