debug: Reduce stack usage on entry from 5 to 4 words

This commit is contained in:
Nero 2020-05-18 18:23:37 +02:00
parent 9ce6ec5476
commit 2a7087a21f

View File

@ -28,7 +28,7 @@ pnp: db "$PnP"
dw 0 ; boot disconnect vector
dw 0 ; bootstrap entry point
dw 0 ; reserved
dw 0
zero: dw 0
name: db "rdos debug", 0
@ -107,20 +107,15 @@ print16:
ret
int3entry:
; save DS and AX
; save DS and load bss segment from IVT
push ds
push ax
; DS=0
xor ax, ax
mov ds, ax
; load bss segment
mov ds, [cs:zero]
mov ds, [bssvec*4]
; pop AX and DX
pop ax
; save AX so we can work with it
mov [reg_ax], ax
; pop DS, IP, CS and flags from stack
pop ax
mov [reg_ds], ax
; pop IP, CS and flags from stack
pop ax
mov [reg_ip], ax
pop ax