diff --git a/rom/debug.asm b/rom/debug.asm index 3f5a7e9..8424bb3 100644 --- a/rom/debug.asm +++ b/rom/debug.asm @@ -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