I have used your info to use Grub.
So, after hours of playing with that (stinking) boot loader, I have loaded my C kernel, but I have only written a few video routines for it. How do I access and decode my keyboard? I have searched this and a few other forums and websites but to no avail. I can't seem to find some C code to do this?
Brett
Keyboards......
Re:Keyboards......
1. Set up an IDT.
2. Reconfigure the PICs so that the interrupts they issue don't conflict with the CPU's built-in exception vectors.
3. Install a handler for IRQ 1.
4. In your IRQ 1 handler, read a scan code from port 0x60, then acknowledge the interrupt at the PIC.
5. Translate scan codes to ASCII codes or Unicode characters or whatever you want.
The FAQ on this site or http://www.osdever.net/ should be able to help you with all of these.
PS: what stinks about GRUB?
2. Reconfigure the PICs so that the interrupts they issue don't conflict with the CPU's built-in exception vectors.
3. Install a handler for IRQ 1.
4. In your IRQ 1 handler, read a scan code from port 0x60, then acknowledge the interrupt at the PIC.
5. Translate scan codes to ASCII codes or Unicode characters or whatever you want.
The FAQ on this site or http://www.osdever.net/ should be able to help you with all of these.
PS: what stinks about GRUB?
Re:Keyboards......
Well, grubs not bad. It's just the time it takes to figure and install it! After you spend your few hours configuring it, It works like a dream.
As to what tutorial on this site where you talking about? I've been to osdever, can't seem to find too much sample code there.
Brett
As to what tutorial on this site where you talking about? I've been to osdever, can't seem to find too much sample code there.
Brett
Re:Keyboards......
You can look into Minix source code for a pretty good sample of how it can be done.
You know Minix and the Minix Book (Operating Systems Development and Implementation., 2nd edition), do you?
Well, as for grub and needing hours to configure it properly: I canna follow this one. RTFM and do as it tells you to do and there you go. Where's the problem?
as for your Keybard problem: ere you do this, take care that you are able to
1. set up a GDT
2. set up a IDT
3. create and register handlers(actually the asm-stubs) in IDT
4. configure the PIC
5. mask/unmask IRQ lines of the PIC at needs.
6. register/unregister IRQ-Handlers (the implemenation) at needs.
You see, there is quite some work ere you can start with the Keyboard driver itself - it is as Tim haws pointed out already.
Stay safe and Take time to read the texts www.osdever.net offers carefully.
You know Minix and the Minix Book (Operating Systems Development and Implementation., 2nd edition), do you?
Well, as for grub and needing hours to configure it properly: I canna follow this one. RTFM and do as it tells you to do and there you go. Where's the problem?
as for your Keybard problem: ere you do this, take care that you are able to
1. set up a GDT
2. set up a IDT
3. create and register handlers(actually the asm-stubs) in IDT
4. configure the PIC
5. mask/unmask IRQ lines of the PIC at needs.
6. register/unregister IRQ-Handlers (the implemenation) at needs.
You see, there is quite some work ere you can start with the Keyboard driver itself - it is as Tim haws pointed out already.
Stay safe and Take time to read the texts www.osdever.net offers carefully.
Re:Keyboards......
*Nothing* compared to writing a bootloader that enables protected mode yourself...vbbrett wrote: Well, grubs not bad. It's just the time it takes to figure and install it!

Every good solution is obvious once you've found it.
Re:Keyboards......
Must say I've figured out writing a boot sequence before being able to use grub. Could just be my incompatibility with gnu-ish software & manualsSolar wrote:*Nothing* compared to writing a bootloader that enables protected mode yourself...vbbrett wrote: Well, grubs not bad. It's just the time it takes to figure and install it!![]()

Re:Keyboards......
How do I acknowledge that I have recieved something?Tim Robinson wrote: 4. In your IRQ 1 handler, read a scan code from port 0x60, then acknowledge the interrupt at the PIC.
I read from port 0x60 then I'm not sure what to do next?
Brett
Re:Keyboards......
Maybe you should download M?bius and/or Clicker and check how they did it?
/ Christoffer
/ Christoffer
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Keyboards......
or simply read an interrupt tutorial (there are some on Bona Fide) and discover outport(0x20,0x20) ;Dvbbrett wrote:How do I acknowledge that I have recieved something?Tim Robinson wrote: 4. In your IRQ 1 handler, read a scan code from port 0x60, then acknowledge the interrupt at the PIC.
I read from port 0x60 then I'm not sure what to do next?
Brett