mirror of https://github.com/0Nera/BMOSP.git
Добавлен модуль PS/2
This commit is contained in:
parent
1f6eaf3ca0
commit
dc73ee66df
|
@ -30,5 +30,8 @@ TERM_WALLPAPER=boot:///boot.jpg
|
|||
MODULE_PATH=boot:///mod/pci.ko
|
||||
MODULE_CMDLINE=[MOD]pci.ko
|
||||
|
||||
MODULE_PATH=boot:///mod/ps2.ko
|
||||
MODULE_CMDLINE=[MOD]ps2.ko
|
||||
|
||||
MODULE_PATH=boot:///boot.tga
|
||||
MODULE_CMDLINE=[BOOTIMG]
|
|
@ -1,3 +1,3 @@
|
|||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 1
|
||||
#define VERSION_BUILD 877
|
||||
#define VERSION_BUILD 891
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#include <system.h>
|
||||
|
||||
static void handler( ) {
|
||||
for (;;) {
|
||||
if (!(inb(0x64) & 1)) { continue; }
|
||||
fb_printf("Получено прерывание, обработка\n");
|
||||
while (!(inb(0x64) & 1)) {}
|
||||
uint64_t byte = inb(0x60);
|
||||
if (byte == 0) { return; }
|
||||
fb_printf("Символ: %c, %u, %x\n", byte, byte, byte);
|
||||
switch (byte) {
|
||||
case 0x1: // Клавиша "ESCAPE"
|
||||
fb_printf("Выход для Bochs\n");
|
||||
|
@ -31,7 +33,6 @@ static void handler( ) {
|
|||
|
||||
outb(0x61, status);
|
||||
}
|
||||
}
|
||||
|
||||
module_info_t __attribute__((section(".minit"))) init(env_t *env) {
|
||||
init_env(env);
|
||||
|
@ -44,5 +45,6 @@ module_info_t __attribute__((section(".minit"))) init(env_t *env) {
|
|||
.err_code = 0,
|
||||
.module_id = 0,
|
||||
.irq = 33,
|
||||
.irq_handler = handler };
|
||||
.irq_handler = handler,
|
||||
.get_func = 0 };
|
||||
}
|
Loading…
Reference in New Issue