(
Bios
CONsole
INput)
LONG Bconin( dev )
WORD dev;
Bconin() reads a character (if available) from a device.
Opcode
2 (0x02)
Availability
Parameters
dev is the device to read a character from:
Name |
dev |
Device |
DEV_PRINTER |
0 |
Parallel port |
DEV_AUX |
1 |
Serial port (or the one mapped with Bconmap?()) |
DEV_CONSOLE |
2 |
Keyboard |
DEV_MIDI |
3 |
MIDI port |
DEV_IKBD |
4 |
IKBD controller (not usable as input device) |
DEV_RAW |
5 |
Raw keyboard |
Other devices |
6 and higher |
Extra character devices (mostly provided through Bconmap?()) |
Binding
move.w #dev,-(sp)
move.w #$02,-(sp)
trap #13
addq.l #4,sp
Return Value
The
LONG value contains 4 8-bit values as follows:
Bits |
Meaning |
31-24 |
SHIFT key status |
23-16 |
Keyboard scancode |
15-8 |
Reserved |
7-0 |
ASCII value |
Comments
Special keys (function keys, cursor keys, etc...) return an ASCII value of 0.
The SHIFT key status is only returned if enabled in system variable conterm (0x484).
See Also