aboutsummaryrefslogtreecommitdiff
path: root/mubios/arch
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-08 07:54:02 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-08 07:54:02 +0800
commite939a810a401b389a398aa10499e7be142bf45ca (patch)
tree1b84fbac69be10f9385f62fd4dc04975b4bfd493 /mubios/arch
parentbb20921d00c770cb30bb85a300423d9062a94d91 (diff)
downloadrcc-project-e939a810a401b389a398aa10499e7be142bf45ca.tar.gz
rcc-project-e939a810a401b389a398aa10499e7be142bf45ca.tar.xz
[mubios] Extend registers from 16-bit to 32-bit
Signed-off-by: Richard Qin <richard.qin.x@gmail.com>
Diffstat (limited to 'mubios/arch')
-rw-r--r--mubios/arch/interrupt.S30
1 files changed, 7 insertions, 23 deletions
diff --git a/mubios/arch/interrupt.S b/mubios/arch/interrupt.S
index 0822b1a..b3a461b 100644
--- a/mubios/arch/interrupt.S
+++ b/mubios/arch/interrupt.S
@@ -53,21 +53,11 @@ int1a_return:
.type \name, @function
\name:
- # Build struct bios_regs on the interrupted real-mode stack.
- push 0
- push es
+ # Build struct bios_regs from the pushad and segment frames.
push ds
- push bp
- push di
- push si
- push dx
- push cx
- push bx
- push ax
-
- mov bp, sp
- mov ax, word ptr [bp + 24]
- mov word ptr [bp + 18], ax
+ push es
+ .byte 0x66
+ pushad
# ESI = linear address of struct bios_regs.
movzx esi, sp
@@ -88,16 +78,10 @@ int1a_return:
call enter_protected_service
# Restore the context modified by the C service.
- pop ax
- pop bx
- pop cx
- pop dx
- pop si
- pop di
- pop bp
- pop ds
+ .byte 0x66
+ popad
pop es
- add sp, 2
+ pop ds
iret
.endm