Page 1 of 1
User input with interrupts
Posted: Mon Mar 03, 2003 11:13 pm
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
Re:User input with interrupts
Posted: Mon Mar 03, 2003 11:40 pm
by Dragonsimoto
0x60 is the keyboard interupt
many good keyboard routines online...look at some of our links on here.
Re:User input with interrupts
Posted: Tue Mar 04, 2003 1:40 am
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
Re:User input with interrupts
Posted: Wed Mar 05, 2003 10:50 am
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
Re:User input with interrupts
Posted: Thu Mar 06, 2003 2:02 am
by _adeelmahmood1
helooooo ?
plz someone answer my question
???
Re:User input with interrupts
Posted: Thu Mar 06, 2003 6:47 am
by Whatever5k
Seems as if your code is buggy...probably need to show some...