mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2025-12-18 04:44:35 +03:00
lesson 23, step 3
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "../libc/string.h"
|
||||
#include "../libc/function.h"
|
||||
#include "../kernel/kernel.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define BACKSPACE 0x0E
|
||||
#define ENTER 0x1C
|
||||
@@ -26,7 +27,7 @@ const char sc_ascii[] = { '?', '?', '1', '2', '3', '4', '5', '6',
|
||||
|
||||
static void keyboard_callback(registers_t regs) {
|
||||
/* The PIC leaves us the scancode in port 0x60 */
|
||||
u8 scancode = port_byte_in(0x60);
|
||||
uint8_t scancode = port_byte_in(0x60);
|
||||
|
||||
if (scancode > SC_MAX) return;
|
||||
if (scancode == BACKSPACE) {
|
||||
|
||||
Reference in New Issue
Block a user