You are not logged in.


#1 2005-03-20 11:33:31

raysad
New member
Registered: 2005-02-20
Posts: 6
PM

keyboard_isr

After looking at the keyboard_isr procedure, at the end, you have a couple of lines of code:

     mov al,0x20
     out 0x20,al

I am thinking that this could use some explaining, what are these two lines, and how do these two lines effect the procedure itself. Another procedural point, you have the keyboard_isr called from ISR 21, but I have not seen anywhere in your code where you call this interrupt. What am I missing?

Offline

 

#2 2005-03-20 12:04:53

bubach
Administrator
From: Trollhättan, Sweden
Registered: 2005-02-15
Posts: 367
PM  Website

Re: keyboard_isr

I don't call that interrupt since it's a IRQ, which means that it's called by "itself" when a key is pressed.
All it does it store the scan-code and then I have a separate function that gets the scan-code and translates it to ASCII.

ASM code:

     mov al0x20
     out 0x20al

Just means "end of IRQ", and must be present.
If you want more info on this I can recommend some reading on osdever.net docs and tutorial parts.

/ Christoffer

Offline

 

#3 2005-03-20 16:15:04

Dex4u
Active member
Registered: 2005-02-19
Posts: 132
PM

Re: keyboard_isr

There are two types of interrupts a software and a hardware, when you write a "int 21h" you get a software int and when a key is pressed you get a hardware int.

A interrupt causes the procsseeor to suspend the current operation and act on the reason for the interruption, 8259 masks all further interrupts from that device until is receives an end of interrupt signal from the interrupt service routine( that is the above code). Once the interrupt has been handled, it returns to the interrupted program.

Offline

 

#4 2005-03-20 17:12:42

bubach
Administrator
From: Trollhättan, Sweden
Registered: 2005-02-15
Posts: 367
PM  Website

Re: keyboard_isr

Thx, for that more detailed explaination. smile

Offline

 

 

Board footer

Powered by PunBB
BOS homepage © Copyright 2005 Christoffer Bubach
Strict XHTML and valid CSS.