How do I implement input and output of text in my kernel?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
monsterhunter445
Posts: 20
Joined: Sun Jan 02, 2011 4:46 pm

How do I implement input and output of text in my kernel?

Post by monsterhunter445 »

Hi everybody, I have finally got my first kernel running and I was wondering how I can implement some sort of input and output of text. Because at this moment I can only clear the screen and print out text. So can anyone please show some example code or direct me to some sort of link, because I haven't found anything on the wiki.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: How do I implement input and output of text in my kernel

Post by NickJohnson »

You need to write a keyboard driver. This is pretty straightforward: read in from port 0x61 on IRQ1 and map scancodes to characters. (This requires interrupts to be set up properly.) Here's the relevant wiki link: http://wiki.osdev.org/Keyboard
monsterhunter445
Posts: 20
Joined: Sun Jan 02, 2011 4:46 pm

Re: How do I implement input and output of text in my kernel

Post by monsterhunter445 »

Thanks for the link, it was really helpful.
Post Reply