Add malloc table dump

This commit is contained in:
Nero 2019-08-30 22:18:05 +00:00
parent aec0218ccf
commit 4e188235f9
3 changed files with 65 additions and 17 deletions

View file

@ -5,16 +5,20 @@ optrom_length:
db 0x00
jmp optrom_init
; reserved area
times (0x1A - ($-$$)) db 0
dw pnp
align 16
pnp:
db "$PnP"
.version:
db 1 ; version 1
.length:
db 2 ; 2 * 16 length
dw 0 ; offset of next header
db 0
.checksum:
db 0 ; checksum (filled by fix-rom)
dd 0 ; device identifier
dw str_vendor ; manufacturer string
@ -32,7 +36,6 @@ str_vendor:
str_product:
db "Nero DOS ", 60, 234, 62, 0
align 16
optrom_init:
; setup data stack below code stack
mov bp, sp
@ -74,26 +77,21 @@ start:
mov ss, ax
mov sp, ax
mov bp, sp
; data stack starts 512 bytes below code stack
sub bp, 0x200
call announce
call malloc_reset
sub bp, 4
mov word [ss:bp], 3
mov word [ss:bp+2], isr_debug
call intr_register
sti
int 3
call malloc_dump
cli
.halt:
hlt
jmp .halt
%include "ramdisk.inc"
%include "printf.inc"
%include "print.asm"
%include "popcnt.asm"
%include "intr.asm"
%include "debug.asm"