diff --git a/include/version.h b/include/version.h index 15713d0..78e5b27 100644 --- a/include/version.h +++ b/include/version.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 1 -#define VERSION_BUILD 897 +#define VERSION_BUILD 899 diff --git a/kernel/start.c b/kernel/start.c index f8a6755..18d9b43 100644 --- a/kernel/start.c +++ b/kernel/start.c @@ -15,6 +15,8 @@ #include #include +char (*getc)( ); + // Точка входа void _start( ) { asm volatile("cli"); @@ -42,13 +44,19 @@ void _start( ) { if (mod == NULL) { fb_set_text_color(0xFF0000); fb_printf("\tТребуется модуль ps2.ko!\n"); + getc = NULL; } else { fb_printf("\nОбнаружен модуль клавиатуры: %s\n", mod->name); + getc = mod->get_func(1); } fb_set_text_color(0x00D000); asm volatile("sti"); - for (;;) { asm volatile("hlt"); } + for (;;) { + asm volatile("hlt"); + + if (getc) { fb_printf("%c", getc( )); } + } } \ No newline at end of file diff --git a/modules/modules.json b/modules/modules.json new file mode 100644 index 0000000..1e16afc --- /dev/null +++ b/modules/modules.json @@ -0,0 +1,7 @@ +[ + { + "info": "Официальный репозиторий модулей", + "git": "https://git.synapseos.ru/Aren/BMOSP_repo.git", + "list": [] + } +] \ No newline at end of file diff --git a/modules/ps2/main.c b/modules/ps2/main.c index 00296ce..1fa42d1 100644 --- a/modules/ps2/main.c +++ b/modules/ps2/main.c @@ -86,7 +86,7 @@ static void handler( ) { while (!(inb(0x64) & 1)) { asm volatile("pause"); } uint8_t scancode = inb(0x60); - char c = ' \0'; + char c = '\0'; if (scancode == 0xE0) { current_state = PREFIX_STATE; @@ -100,20 +100,19 @@ static void handler( ) { } if (is_shift(scancode) != 0) { - keyboard_buffer->shift_pressed = is_shift(scancode); + keyboard_buffer.shift_pressed = is_shift(scancode); after_interrupt( ); return; } if (is_ctrl(scancode) != 0) { - keyboard_buffer->ctrl_pressed = is_ctrl(scancode); + keyboard_buffer.ctrl_pressed = is_ctrl(scancode); after_interrupt( ); return; } if (current_state == PREFIX_STATE) { current_state = NORMAL_STATE; } - if (ru) { if (keyboard_buffer.shift_pressed) { c = ru_chars_shifted[scancode];