Quote of the day.Kevin wrote:And also that irq has nothing to do with IRQs?
Keyboard handler doesn't display
Re: Keyboard handler doesn't display
Re: Keyboard handler doesn't display
So, what do you suppose reading port 0x20 does?DixiumOS wrote:Quote of the day.Kevin wrote:And also that irq has nothing to do with IRQs?
Re: Keyboard handler doesn't display
iansjack wrote:So, what do you suppose reading port 0x20 does?DixiumOS wrote:Quote of the day.Kevin wrote:And also that irq has nothing to do with IRQs?
Reading IRQ1.
Also, if my previous one did it with 0x20, how can it not work this time? Did the Matrix change? No.
Re: Keyboard handler doesn't display
Oh God! Your post made me so nervous. Let me explain something: there is no such thing as keyboard_outportb, Outportb and Inportb are universal hardware calls that do not bound to specific drivers. You need to seperate them into a custom file. Also what does 0x20 do, never seen anybody doing it your way. Also your x++ makes me want to end my life forever. Please please make a proper print character function.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Keyboard handler doesn't display
Guys, stop replying. You really aren't helping. Stop telling him how IRQs and port IO work. If he doesn't know the language he’s using (C), he won't get anywhere even if he knows all the OSDev theory.
BTW, I've never seen infinite loops in an IRQ handler.
BTW, I've never seen infinite loops in an IRQ handler.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: Keyboard handler doesn't display
It's not an IRQ handler for cat's sake.
Also, I could get it working by moving the scancode and IRQ unsigned chars into the loop, then it worked ya-
Well, it still displayed "f" instead of "abcdef", but okay. I'll get to that later.
Also, I could get it working by moving the scancode and IRQ unsigned chars into the loop, then it worked ya-
Well, it still displayed "f" instead of "abcdef", but okay. I'll get to that later.
Re: Keyboard handler doesn't display
The command port of the 8259 Pic is write only. (You learn this sort of thing by reading its documentation.) A read of it is either going to return 0 or an undefined value (not sure which, and can't be bothered to test it). In other words, it's meaningless.DixiumOS wrote:Reading IRQ1.
Also, if my previous one did it with 0x20, how can it not work this time? Did the Matrix change? No.
- sleephacker
- Member
- Posts: 97
- Joined: Thu Aug 06, 2015 6:41 am
- Location: Netherlands
Re: Keyboard handler doesn't display
There is no keyboard.DixiumOS wrote:Also, if my previous one did it with 0x20, how can it not work this time? Did the Matrix change? No.
But seriously, I think you might need to check the wiki page about the PS/2 Controller, and the way it sends bytes.
What you seem to be trying to do is polling, which is quite simple:
- 1. Test if bit 0 of the Status Register is set
2. If so, read from the Data Port
3. Repeat
Once you get polling to work and you know you can communicate with the PS/2 controller / device properly, you should try to use interrupts instead, which is also described on the wiki.
Re: Keyboard handler doesn't display
There are several statements in your comment that is wrong, but I'll let you realize it.iansjack wrote:The command port of the 8259 Pic is write only. (You learn this sort of thing by reading its documentation.) A read of it is either going to return 0 or an undefined value (not sure which, and can't be bothered to test it). In other words, it's meaningless.DixiumOS wrote:Reading IRQ1.
Also, if my previous one did it with 0x20, how can it not work this time? Did the Matrix change? No.
Re: Keyboard handler doesn't display
You're priceless!
Re: Keyboard handler doesn't display
This thread has been fun to read at least!
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Re: Keyboard handler doesn't display
Maybe next time you try it with understanding rather than quoting.DixiumOS wrote:Quote of the day.
Do you know what an IRQ is? Hint: It's nothing that can be read.Reading IRQ1.So, what do you suppose reading port 0x20 does?
-
- Member
- Posts: 5587
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Keyboard handler doesn't display
Oh, I just realized that I'm turning into one of you...iansjack wrote:You're priceless!
meh whatever
- dchapiesky
- Member
- Posts: 204
- Joined: Sun Dec 25, 2016 1:54 am
- Libera.chat IRC: dchapiesky
Re: Keyboard handler doesn't display
is that a threat?DixiumOS wrote:Oh, I just realized that I'm turning into one of you...iansjack wrote:You're priceless!
meh whatever
Plagiarize. Plagiarize. Let not one line escape thine eyes...