PDA

View Full Version : My wish: AT Keyboard and Mouse commands



sayzer
- 4th February 2006, 09:23
I wish a command that will accept a standard (or PS/2) AT keyboard input.
I also wish a command that will accept a standard (or PS/2) mouse input.

For example:

DEFINE KEYBOARD_DREG PORTB
DEFINE KEYBOARD_DBIT 0
DEFINE KEYBOARD_CLKREG PORTB
DEFINE KEYBOARD_CLKBIT 1

DEFINE MOUSE_DREG PORTC
DEFINE MOUSE_DBIT 0
DEFINE MOUSE_CLKREG PORTC
DEFINE MOUSE_CLKBIT 1

keyb_in var byte
mouse_in var byte

loop:

keyboard keyb_in 'keyboard is the command to store data in keyb_in variable
mouse mouse_in 'mouse is the command to store data in mouse_in variable

goto loop


Another example:

No define required.

keyb_in var byte
mouse_in var byte

loop:

keyboard portb.0,portb.1,keyb_in 'Keyboard clk pin is connected to RB0, and data is to RB1, data stored in keyb_in variable

mouse porta.0,porta.1,mouse_in ' Mouse clk pin is connected to RA0, and data to RA1, data is stored in mouse_in variable

goto loop

Just an imagination that would make it much easier to use keyboard and mouse data in PBP. Rather then using lots of codes to store the data from these two, why not having a standard command for them?