debug: Reduce stack usage on entry from 5 to 4 words
This commit is contained in:
parent
9ce6ec5476
commit
2a7087a21f
@ -28,7 +28,7 @@ pnp: db "$PnP"
|
|||||||
dw 0 ; boot disconnect vector
|
dw 0 ; boot disconnect vector
|
||||||
dw 0 ; bootstrap entry point
|
dw 0 ; bootstrap entry point
|
||||||
dw 0 ; reserved
|
dw 0 ; reserved
|
||||||
dw 0
|
zero: dw 0
|
||||||
|
|
||||||
name: db "rdos debug", 0
|
name: db "rdos debug", 0
|
||||||
|
|
||||||
@ -107,20 +107,15 @@ print16:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
int3entry:
|
int3entry:
|
||||||
; save DS and AX
|
; save DS and load bss segment from IVT
|
||||||
push ds
|
push ds
|
||||||
push ax
|
mov ds, [cs:zero]
|
||||||
; DS=0
|
|
||||||
xor ax, ax
|
|
||||||
mov ds, ax
|
|
||||||
; load bss segment
|
|
||||||
mov ds, [bssvec*4]
|
mov ds, [bssvec*4]
|
||||||
; pop AX and DX
|
; save AX so we can work with it
|
||||||
pop ax
|
|
||||||
mov [reg_ax], ax
|
mov [reg_ax], ax
|
||||||
|
; pop DS, IP, CS and flags from stack
|
||||||
pop ax
|
pop ax
|
||||||
mov [reg_ds], ax
|
mov [reg_ds], ax
|
||||||
; pop IP, CS and flags from stack
|
|
||||||
pop ax
|
pop ax
|
||||||
mov [reg_ip], ax
|
mov [reg_ip], ax
|
||||||
pop ax
|
pop ax
|
||||||
|
Loading…
Reference in New Issue
Block a user