Kernel Keyboard Capture
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Kernel Keyboard Capture
I have my basic kernel below with source and Floppy.img. The next step for me is reading from the Keyboard.
I want the user be able to type then press enter for new line. I'll do files and commands after basic input.
Anyone want to explain this or have a link to a tutorial?
Heres my Basic Kernel:(At GRUB Type "Kernel 200+26", Enter, then "Boot"
http://www.mediafire.com/?ywuii4lmyrh
Screenshot:
I want the user be able to type then press enter for new line. I'll do files and commands after basic input.
Anyone want to explain this or have a link to a tutorial?
Heres my Basic Kernel:(At GRUB Type "Kernel 200+26", Enter, then "Boot"
http://www.mediafire.com/?ywuii4lmyrh
Screenshot:
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
Re: Kernel Keyboard Capture
Use GOOGLE and THE WIKI everything is on the wiki. Use JamesM's tutorials for reference. and learn to use google.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Re: Kernel Keyboard Capture
I used google extensively and found some but couldn't get them to work
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
- gzaloprgm
- Member
- Posts: 141
- Joined: Sun Sep 23, 2007 4:53 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: Kernel Keyboard Capture
Not that hard, you have lots of tutorials and documents:
http://osdever.net/bkerndev/Docs/keyboard.htm
http://www.brokenthorn.com/Resources/OSDev19.html
http://a.michelizza.free.fr/pmwiki.php?n=TutoOS.Kbd
http://www.nondot.org/sabre/os/files/HCI/keyboard.txt
http://www.nondot.org/sabre/os/files/HCI/keyboard2.txt
http://www.osdever.net/documents/kbd.php?the_id=14
It is as simple as setting correctly the idt, remmaping the pic and reading from port 0x60 when IRQ1 fires.
STFW.
Cheers,
Gonzalo
http://osdever.net/bkerndev/Docs/keyboard.htm
http://www.brokenthorn.com/Resources/OSDev19.html
http://a.michelizza.free.fr/pmwiki.php?n=TutoOS.Kbd
http://www.nondot.org/sabre/os/files/HCI/keyboard.txt
http://www.nondot.org/sabre/os/files/HCI/keyboard2.txt
http://www.osdever.net/documents/kbd.php?the_id=14
It is as simple as setting correctly the idt, remmaping the pic and reading from port 0x60 when IRQ1 fires.
STFW.
Cheers,
Gonzalo
Visit https://gzalo.com : my web site with electronic circuits, articles, schematics, pcb, calculators, and other things related to electronics.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Kernel Keyboard Capture
Also, why are you spamming with your kernel... If you want to ask about the keyboard, just do so. I've seen you do this in numerous topics. Where are the mods?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Re: Kernel Keyboard Capture
I put my source because, someone might of wanted to see how basic my kernel is, or see what commands I have available.
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Kernel Keyboard Capture
Do you see anyone else doing that around here? Why do you think your kernel is so special? Why would anyone want to see how basic it is? Honestly, your code stinks. Not trying to be a troll, you should research more. If someone wants to see a basic kernel, we've got tutorials for that on the wiki.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Re: Kernel Keyboard Capture
Looking at your code, you still haven't set up the GDT, IDT, and ISR handlers. You need (well, not need, see neons post after mine) to do that before you create your keyboard code.
That info is on the wiki, and since you took from JamesM's tutorials, I'll also suggest you look there.
-JL
That info is on the wiki, and since you took from JamesM's tutorials, I'll also suggest you look there.
-JL
Last edited by piranha on Sat Jan 24, 2009 4:47 pm, edited 1 time in total.
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Re: Kernel Keyboard Capture
...You should really consider not taking source code directly from tutorials but instead learning from them and writing them yourself. You learn more that way.
Also, you don't *need* an IDT, GDT, nor ISRs for keyboard handling. Just disable IRQ1 and poll the keyboard controller for any input. Its not a nice way to do it, but its possible.
Also, you don't *need* an IDT, GDT, nor ISRs for keyboard handling. Just disable IRQ1 and poll the keyboard controller for any input. Its not a nice way to do it, but its possible.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Kernel Keyboard Capture
That's the way I do it in my pmode assembly language kernel. Sure, it's ugly, but it works! (for a bit.)neon wrote:Also, you don't *need* an IDT, GDT, nor ISRs for keyboard handling. Just disable IRQ1 and poll the keyboard controller for any input. Its not a nice way to do it, but its possible.