diff --git a/07_day/int.c b/07_day/int.c index ad7176e..708d97d 100644 --- a/07_day/int.c +++ b/07_day/int.c @@ -28,11 +28,15 @@ void inthandler21(int *esp) /* 来自PS/2键盘的中断 */ { struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO; - boxfill8(binfo->vram, binfo->scrnx, COL8_000000, 0, 0, 32 * 8 - 1, 15); - putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, "INT 21 (IRQ-1) : PS/2 keyboard"); - for (;;) { - io_hlt(); - } + unsigned char data, s[4]; + io_out8(PIC0_OCW2, 0x61); /* IRQ-01受付完了をPICに通知 */ + data = io_in8(PORT_KEYDAT); + + sprintf(s, "%02X", data); + boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 0, 16, 15, 31); + putfonts8_asc(binfo->vram, binfo->scrnx, 0, 16, COL8_FFFFFF, s); + + return; } void inthandler2c(int *esp)