diff --git a/lib/gdt.c b/lib/gdt.c index 2b35d2d..3397da2 100755 --- a/lib/gdt.c +++ b/lib/gdt.c @@ -35,13 +35,13 @@ void initgdt() movw %ax, %es \n \ movw %ax, %fs \n \ movw %ax, %gs \n \ - movl 0x0C(%esp), %eax \n \ + movl 0x0C(%esp), %ebx \n \ movw $0x18, %ax \n \ movw %ax, %ss \n \ movl $0x20000, %esp \n \ - pushl %eax \n \ ljmp $0x08, $raz \n \ raz: \n \ + pushl %ebx \n \ ret\n"); } diff --git a/lib/keyboard.c b/lib/keyboard.c index b5127f0..e7ed557 100755 --- a/lib/keyboard.c +++ b/lib/keyboard.c @@ -106,7 +106,7 @@ u8* getstring(u8* temp) { pointer--; putchar(ascii); } - else if (ascii>31 && pointer<=&temp+80) { + else if (ascii>31 && pointer<=temp+80) { *pointer++=ascii; putchar(ascii); } @@ -252,6 +252,12 @@ unsigned convert(u32 keypressed) outkbd(0x60, temp); /* 3 bits de poids faible pour les LEDs */ return 0; } +/* Appuie de CRTL + ALT + SUPR ? */ + if ((kbdstatus & STATUS_CTRL) && (kbdstatus & STATUS_ALT) + (key == 73)) { + print("redemarrage du systeme"); + reboot(); + } /* est ce un code etendu */ if ((bufferscan[lastscan] == 0xE0) || ((kbdstatus & STATUS_NUM) && (key >= 0x47) && (key <= 0x53) @@ -311,16 +317,9 @@ unsigned convert(u32 keypressed) else temp = set1_normal[key]; } - /* si scancode non reconnu fin de fonction */ if (temp == 0) return temp; -/* Appuie de CRTL + ALT + SUPR ? */ - if ((kbdstatus & STATUS_CTRL) && (kbdstatus & STATUS_ALT) && - (key == 76)) { - print("redemarrage du systeme"); - reboot(); - } /* Renvoie le Code ascii */ return temp; } diff --git a/system/system.c b/system/system.c index b7eb961..79ae892 100755 --- a/system/system.c +++ b/system/system.c @@ -60,17 +60,17 @@ int main(void) ok(); print(" -Installation du handler timer (IRQ 0)\000"); - setidt((u32) timer, 0x20, INTGATE, 32); + setidt((u32) timer, 0x8, INTGATE, 32); enableirq(0); ok(); print(" -Installation du handler clavier (IRQ 1)\000"); - setidt((u32) keyboard, 0x20, INTGATE, 33); + setidt((u32) keyboard, 0x8, INTGATE, 33); enableirq(1); ok(); print(" -Installation du handler souris (IRQ12+Cascade IRQ2)\000"); - setidt((u32) mouse, 0x20, INTGATE, 100); + setidt((u32) mouse, 0x8, INTGATE, 100); enableirq(2); enableirq(12); if (initmouse() != 1)