From e939a810a401b389a398aa10499e7be142bf45ca Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sun, 8 Nov 2026 07:54:02 +0800 Subject: [mubios] Extend registers from 16-bit to 32-bit Signed-off-by: Richard Qin --- mubios/services/int10.c | 6 +++--- mubios/services/int13.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'mubios/services') diff --git a/mubios/services/int10.c b/mubios/services/int10.c index 76a1c1d..0e63ef2 100644 --- a/mubios/services/int10.c +++ b/mubios/services/int10.c @@ -44,7 +44,7 @@ int10_service (struct bios_regs *regs) u8 attribute; u16 position; - function = (u8)(regs->ax >> 8); + function = (u8)(regs->eax >> 8); if (function != 0x0Eu) return; @@ -52,8 +52,8 @@ int10_service (struct bios_regs *regs) cursor = (volatile u16 *)BDA_CURSOR; video = (volatile u16 *)VGA_TEXT_BASE; - character = (u8)regs->ax; - attribute = (u8)regs->bx; + character = (u8)regs->eax; + attribute = (u8)regs->ebx; position = *cursor; if (character == 0x0Du) diff --git a/mubios/services/int13.c b/mubios/services/int13.c index e5cef43..2c12261 100644 --- a/mubios/services/int13.c +++ b/mubios/services/int13.c @@ -38,7 +38,7 @@ struct edd_packet static void int13_fail (struct bios_regs *regs) { - regs->ax = 0x0100u; + regs->eax = 0x0100u; regs->flags |= BIOS_CF; } @@ -47,7 +47,7 @@ get_edd_packet (struct bios_regs *regs) { u32 address; - address = ((u32)regs->ds << 4) + regs->si; + address = ((u32)regs->ds << 4) + (u16)regs->esi; return (struct edd_packet *)address; } @@ -58,19 +58,19 @@ int13_service (struct bios_regs *regs) struct edd_packet *packet; u32 buffer_address; - function = (u8)(regs->ax >> 8); + function = (u8)(regs->eax >> 8); if (function == 0x41u) { - if (regs->bx != 0x55AAu) + if (regs->ebx != 0x55AAu) { int13_fail (regs); return; } - regs->ax = 0x3000u; - regs->bx = 0xAA55u; - regs->cx |= 0x0001u; + regs->eax = 0x3000u; + regs->ebx = 0xAA55u; + regs->ecx |= 0x0001u; regs->flags &= (u16)~BIOS_CF; return; } @@ -98,7 +98,7 @@ int13_service (struct bios_regs *regs) return; } - regs->ax = 0; + regs->eax = 0; regs->flags &= (u16)~BIOS_CF; return; } -- cgit v1.2.3