I tried doing the following:
Code: Select all
void PIC_remap(void) {
asm(".intel_syntax noprefix");
asm("mov al, 0x11");
asm("out 0x20, al");
asm("out 0xA0, al");
asm("mov al, 0x20");
asm("out 0x21, al");
asm("mov al, 0x28");
asm("out 0xA1, al");
asm("mov al, 0x04");
asm("out 0x21, al");
asm("mov al, 0x02");
asm("out 0xA1, al");
asm("mov al, 0x01");
asm("out 0x21, al");
asm("out 0xA1, al");
}
Code: Select all
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s: Assembler messages:
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:330: Error: no such instruction: `subl $4,%esp'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:334: Error: operand size mismatch for `in'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:337: Error: operand type mismatch for `movzbl'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:338: Error: junk `(%eax)' after expression
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:339: Error: no such instruction: `movl %eax,(%esp)'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:341: Error: no such instruction: `addl $4,%esp'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:355: Error: operand size mismatch for `in'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:363: Error: no such instruction: `subl $4,%esp'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:367: Error: operand size mismatch for `in'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:370: Error: operand type mismatch for `movzbl'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:371: Error: junk `(%eax)' after expression
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:372: Error: no such instruction: `movl %eax,(%esp)'
C:\Users\Nuno\AppData\Local\Temp\ccyCmahd.s:374: Error: no such instruction: `addl $4,%esp'
i686-elf-gcc: error: kernel.o: No such file or directory
My keyboard handler is complete, it only needs a working IRQ remapper. And yes, i did write most of the additional code that was needed in order for it to stop spamming 7's ("7 "'s if nulls are not ignored in putchar) when the mouse was moved and filled the screen with whatever character was pressed.