Use optimized error handling for boot sector
This commit is contained in:
parent
cb48e628db
commit
3da473a00c
2 changed files with 27 additions and 23 deletions
18
inc/booterr.asm
Normal file
18
inc/booterr.asm
Normal file
|
@ -0,0 +1,18 @@
|
|||
errcll: pop dx
|
||||
errjmp: call dmpdx
|
||||
hlt: hlt
|
||||
jmp hlt
|
||||
dmpdx: xor bx, bx
|
||||
mov ah, 0x0e
|
||||
mov cl, 4
|
||||
call dmpdx1
|
||||
dmpdx1: call dmpdx2
|
||||
dmpdx2: mov al, dh
|
||||
shl dx, cl
|
||||
shr al, cl
|
||||
add al, 0x30
|
||||
cmp al, 0x3a
|
||||
jl dmpdx3
|
||||
add al, 7
|
||||
dmpdx3: int 0x10
|
||||
ret
|
Loading…
Add table
Add a link
Reference in a new issue