diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-11-08 08:23:44 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-11-08 08:23:44 +0800 |
| commit | c6ab70ee3c9dea7c341b13a3363c758b9623f468 (patch) | |
| tree | 3e0ed98c1c5ce2c034da252b4e785a16c2d6648f /mubios/services | |
| parent | 2ba58d6b68e02a4aa9cd6e2a61990f8f2713f08c (diff) | |
| download | rcc-project-master.tar.gz rcc-project-master.tar.xz | |
Signed-off-by: Richard Qin <richard.qin.x@gmail.com>
Diffstat (limited to 'mubios/services')
| -rw-r--r-- | mubios/services/int16.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mubios/services/int16.c b/mubios/services/int16.c index 7acccfb..4a04828 100644 --- a/mubios/services/int16.c +++ b/mubios/services/int16.c @@ -23,7 +23,8 @@ #define BDA_KBD_HEAD 0x041Au #define BDA_KBD_TAIL 0x041Cu #define BDA_KBD_BUFFER 0x041Eu -#define BDA_KBD_BUFFER_END 0x043Eu +#define BDA_KBD_BUFFER_START 0x001Eu +#define BDA_KBD_BUFFER_END 0x003Eu static u8 scancode_to_ascii (u8 scancode) @@ -124,7 +125,7 @@ int16_service (struct bios_regs *regs) } position = *head; - value = buffer[(position - BDA_KBD_BUFFER) >> 1]; + value = buffer[(position - BDA_KBD_BUFFER_START) >> 1]; scancode = (u8)(value >> 8); ascii = scancode_to_ascii (scancode); @@ -136,7 +137,7 @@ int16_service (struct bios_regs *regs) position += 2; if (position >= BDA_KBD_BUFFER_END) - position = BDA_KBD_BUFFER; + position = BDA_KBD_BUFFER_START; *head = position; } |
