Code: Select all
kernel.c: In function ‘KeyboardIsr’:
kernel.c:102: error: ‘byte’ undeclared (first use in this function)
kernel.c:102: error: (Each undeclared identifier is reported only once
kernel.c:102: error: for each function it appears in.)
kernel.c:102: error: expected ‘;’ before ‘new_scan_code’
Code: Select all
// Taking input...
unsigned char inportb (unsigned short _port)
{
unsigned char rv;
__asm__ __volatile__ ("inb %1, %0" : "=a" (rv) : "dN" (_port));
return rv;
};
// ...and gathering output.
void outportb (unsigned short _port, unsigned char _data)
{
__asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data));
};
// It's self explanitory: The Keyboard ISR (and accompanying variables).
void KeyboardIsr()
{
byte new_scan_code = inportb(0x60);
/* Do something with the scancode.
* Remember you only get one byte of the scancode each time the ISR is invoked.
* (Though most of the times the scancode is only one byte.)
*/
/* Acknowledge the IRQ, pretty much tells the PIC that we can accept >=priority IRQs now. */
outportb(0x20,0x20);
}
In addition, I'm wondering if there's a direct tutorial on making a sort of ... command shell for the kernel. I'm exhausted from working on my OS for a day and I need a break, my brain is literally fried.