At this stage of development, I've implemented an interrupt handling routine, including one for the keyboard. My current goal is to press a key and have the corresponding character appear on the VGA screen.
The problem is that some characters simply don't work. For example, when I press the 'o' key (the vowel 'o'), an uppercase 'Q' is printed on the screen. I've run several tests but just can't seem to find the source of the problem.
The oddest part is that it works correctly in QEMU but not in Bochs.
The keyboard configuration in Bochs is set up as follows:
Code: Select all
keyboard: type=mf, keymap=/usr/share/bochs/keymaps/sdl2-pc-us.mapKeyboard Handler:
Code: Select all
void keyboard_handler(void)
{
unsigned int scancode = _in_b(0x60);
if (!(scancode & 0x80)) {
_sys_print_char(scan_code_table[scancode]);
}
}
Code: Select all
_sys_print_char:
mov bx, ax
mov ax, 3 ; SYS_PRINT_CHAR = 3
int 0x60
ret
Thanks!
