lesson 23, step 3

This commit is contained in:
Carlos
2015-08-18 10:31:28 +02:00
parent 92ff191c3d
commit de3d442569
18 changed files with 124 additions and 127 deletions

View File

@@ -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) {