User input with interrupts

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
adeelmahmood1

User input with interrupts

Post by adeelmahmood1 »

hi
i have set up my IDT to work with my C kernel now i want to get the input from the user via keyboard ..
which interrupt should i use for this ..?
how can i get the input from the keyboard .. ?
also i want to know that what else we can do with interrupts ..
one more question that how we can know that where is our data segment located in the memory
thanx for ur help
Dragonsimoto

Re:User input with interrupts

Post by Dragonsimoto »

0x60 is the keyboard interupt

many good keyboard routines online...look at some of our links on here.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:User input with interrupts

Post by distantvoices »

Mr. Dragonsimoto, 0x60 is the keyboard data port. 0x64 is the keyboard command (write) and status (read) port. More info: see the documents mentioned below.

Regarding to adeelmahmood's question, i'd suggest, he scans and reads throu http://osdev.neopages.net/.

there he will find nifty tips and trickses, explained down to the nitty gritty.

http://osdev.neopages.net/docs/wout_kbd.php is also useful as well as http://osdev.neopages.net/docs/kbd.php. There, Keyboard programming is explained in well structured manner.

stay safe
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
adeelmahmood1

Re:User input with interrupts

Post by adeelmahmood1 »

i have set up my IDT to work with my kernel. i want to use interrupts
for keyboard input. for that i have remapped my IRQ 1 on IRQ 0x21
and for setting up the IDT i have masked my IRQ's so that they could
not fire an interrupt. but after setting my IDT when i try to
unmask them it gets reset with
fetch_raw_descriptor IDT.VALID=0
bochs error. but if dont unmask them it works fine .. for keyboard
i need to unmask IRQ 1 but this is th e problem i m having ..
plz help me out
_adeelmahmood1

Re:User input with interrupts

Post by _adeelmahmood1 »

helooooo ?
plz someone answer my question
???
Whatever5k

Re:User input with interrupts

Post by Whatever5k »

Seems as if your code is buggy...probably need to show some...
Post Reply