Keyboard I/O Prob...
Keyboard I/O Prob...
I'm telling you, I can NOT get any value from the keyboard using in OR inportb while the Ints are Enabled!
Re:Keyboard I/O Prob...
That just can't be. You must have a problem with your inportb() function or something with your idt or maybe you're not sti'ing the interrupts or maybe you haven't enabled all interrupts of the pic (maybe you disabled them all).
are you getting any clock interrupts?
are you getting any clock interrupts?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Keyboard I/O Prob...
that's a pity ... i'll light a candle and pray for Tanenbaum's mercy ...
is it on real hardware ? on bochs ? ... did u ensure you had no more polling loop ? ...
is it on real hardware ? on bochs ? ... did u ensure you had no more polling loop ? ...
Re:Keyboard I/O Prob...
I did STI...with ints disabled I can poll...I never use Bochs for FritzOS...I use reboot -f
my inportb is not messed up...because the "In" function in asm is not working either;)
and it calls the IRQ..I tested when it calles it to print "1"
my IDT is fine....I think...
my inportb is not messed up...because the "In" function in asm is not working either;)
and it calls the IRQ..I tested when it calles it to print "1"
my IDT is fine....I think...
Re:Keyboard I/O Prob...
i'll ask you one more time. Are you getting any clock interrupts? (int
Re:Keyboard I/O Prob...
First of all: Tom, we know your code isn't working. You don't need to tell us 86 times...
Second: the actual inportb() and the IN instruction do work. If the IN instruction appears in your disassembly, it will work: bugs don't work their way into the CPU hardware.
Third: there is no direct interaction between the IN instruction and interrupts. However, what the hardware does when you read a port is up to the hardware. For example, once you receive IRQ1, the keyboard controller won't issue any more interrupts until you read from port 0x60.
In summary: there's a problem in your code somewhere. In the end, it's your code, not ours, and no amount of complaining about inportb() will fix it. Those of us who've got further in OS development than you have solved all these problems for ourselves, so it's possible -- it just takes a lot of effort.
Second: the actual inportb() and the IN instruction do work. If the IN instruction appears in your disassembly, it will work: bugs don't work their way into the CPU hardware.
Third: there is no direct interaction between the IN instruction and interrupts. However, what the hardware does when you read a port is up to the hardware. For example, once you receive IRQ1, the keyboard controller won't issue any more interrupts until you read from port 0x60.
In summary: there's a problem in your code somewhere. In the end, it's your code, not ours, and no amount of complaining about inportb() will fix it. Those of us who've got further in OS development than you have solved all these problems for ourselves, so it's possible -- it just takes a lot of effort.
Re:Keyboard I/O Prob...
ncsu121978,
can I see your install_handler code?(and it's whole header file )
can I see your install_handler code?(and it's whole header file )
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Keyboard I/O Prob...
just a silly question ... you don't own an USB keyboard, do you ?
maybe it's something to configure in the BIOS (emulate old keyboard) or something alike ... a.f.a.i.k. both legacy and PS/2 keyboards come through 0x60..0x64 in ports, but for USB ones, i think they use some other method (dunno which one, though
maybe it's something to configure in the BIOS (emulate old keyboard) or something alike ... a.f.a.i.k. both legacy and PS/2 keyboards come through 0x60..0x64 in ports, but for USB ones, i think they use some other method (dunno which one, though
Re:Keyboard I/O Prob...
i do not own a usb keyboard...or are you even talking to me ?
anywho the code i put up works perfectly fine for me
anywho the code i put up works perfectly fine for me
Re:Keyboard I/O Prob...
I use a PS/2 that's why with ints disabled I can use polling...
still trying...
still trying...
Re:Keyboard I/O Prob...
I need another IDT example...mabe one in C....tried Warmasters...but asm is ok
The IDT I have is bad. Don't argue. I have tested ALL the code. All the code...I don't have much time for OS dev mabe for a while...so just belive me....
Does anyone have a working tested IDT?
In Asm(intel/at&t) or C?
Thank you(when I use my IDT and read ports, the computer crashes)
The IDT I have is bad. Don't argue. I have tested ALL the code. All the code...I don't have much time for OS dev mabe for a while...so just belive me....
Does anyone have a working tested IDT?
In Asm(intel/at&t) or C?
Thank you(when I use my IDT and read ports, the computer crashes)
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Keyboard I/O Prob...
mine works fine from about 2 years. get it at http://sourceforge.net/projects/clickerTom wrote:
Does anyone have a working tested IDT?
In Asm(intel/at&t) or C?
Thank you(when I use my IDT and read ports, the computer crashes)
i hope you'll find it useable ... (see kernel/interrpt.c, core/control.asm and core/config.asm)
Re:Keyboard I/O Prob...
doesn't your OS run in v86 mode? Pype...would I have to do anything special with your code before I test it...?