keyboard ISR

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
OSNewbie

keyboard ISR

Post by OSNewbie »

hi, i have a keyboard isr that displays the ascii value of the key i press, that works great. my question is what is a common thing to do with the keys after they are pressed. are they simply stored in a buffer until they can be processed? if so, how does the kernel interface with the buffer? are there functions to see if a key is waiting on the buffer and read/delete it from buffer?

i am just wondering what are some common ways of dealing with this.

thanks
VoidLogic

RE:keyboard ISR

Post by VoidLogic »

There are a number of ways to deal with this, i'll assmume your using C++

1. you could create a intrp to put the vaules in a buffer,array or vector
2. you could use Bios.h to see if a key is read and get it when if it is, (thus just using the hardware buffer) and send it to the task that needs it. This action would be a system idle task of the like

its all highly dependent on the platform (real mode, pmode, etc.) and the type of OS, micro kernel, monolithic kernel, multitasking?, method if it does, etc

VoidLogic
Post Reply