From f3541313a873e431f79df94a7bd475e7a3db7b6c Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sun, 8 Nov 2026 08:01:11 +0800 Subject: [mubios] Implement INT 16h Keyboard Service Signed-off-by: Richard Qin --- mubios/core/bda.c | 5 +++++ mubios/core/interrupt.c | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'mubios/core') diff --git a/mubios/core/bda.c b/mubios/core/bda.c index 8417605..7220719 100644 --- a/mubios/core/bda.c +++ b/mubios/core/bda.c @@ -44,6 +44,9 @@ bda_init (void) store_u16 (bda + BDA_EQUIPMENT_OFFSET, (u16)(ebda_base >> 4)); store_u16 (bda + BDA_CONVENTIONAL_MEMORY_OFFSET, (u16)(ebda_base >> 10)); + + store_u16 (bda + 0x001Au, 0x041Eu); + store_u16 (bda + 0x001Cu, 0x041Eu); } struct ivt_entry @@ -60,6 +63,7 @@ extern void int1a_entry (void); extern void int10_entry (void); extern void int13_entry (void); extern void int15_entry (void); +extern void int16_entry (void); static void install_ivt_entry (u8 vector, void (*handler) (void)) @@ -85,4 +89,5 @@ ivt_init (void) install_ivt_entry (0x10u, int10_entry); install_ivt_entry (0x13u, int13_entry); install_ivt_entry (0x15u, int15_entry); + install_ivt_entry (0x16u, int16_entry); } diff --git a/mubios/core/interrupt.c b/mubios/core/interrupt.c index 9c71492..bf2ebc3 100644 --- a/mubios/core/interrupt.c +++ b/mubios/core/interrupt.c @@ -39,6 +39,10 @@ bios_service_dispatch (u8 vector, struct bios_regs *regs) int15_service (regs); break; + case 0x16u: + int16_service (regs); + break; + default: regs->eax = 0x0100u; regs->flags |= 0x0001u; -- cgit v1.2.3