Keyboard Device Specification

Memory Layout

Byte Mode Name Description
00 R X error indicator
01-02 R - zero
03 R Y character count
04-05R - zero
06 R E extension
07 R Z character

Operation

The program will contact the motherboard at [host:]port and register itself with the given address and interrupt. Then, the program will be ready to receive bytes and display them. Under Unix, bytes are read from Standard Input. Under Windows, characters might be typed when the keyboard device has the input focus or files may be droped on the keyboard. Whenever a byte is received, the device will signal an interrupt with the given interrupt number. At the given address, it will provide a read only octabyte in the format: given above.

The X byte signals errors. It will be 0x80 if an error occured and 0x00 otherwise. By setting the sign bit errors can be easily checked..

The Y byte contains the number of characters that were typed since the last read operation on Z. This should be 0, if no character was received or 1 if a single character waits to be read from Z. Any other value will indicate that characters were lost since the last read operation.

The E byte is zero if the key pressed corresonds to a ASCII character or is printable, it is one, if the key pressed is an extended key. Like PageUp, PageDown, LeftArrow, RightArrow, UpArrow, DownArrow, Home,End, Inser, Delete, or one of the Function Keys F1 to F12. This feature is currently only available in the Windows version.

The Z byte contains the last character typed if E is zero. If E is one, the Z byte will be the virtual key code.

The Z byte is valid only if Y is not zero.

The complete ocatbyte will be reset to zero after reading Z..

Configuration

The Keyboard has the following configurable parameters:
host localhost the host where the bus is located
port 9002 the port where the bus is located
address default address where the resource is located
interrupt not set interrupt sent when character is ready
x 0the x position of the window
y 0the y position of the window
minimized falsestart with a minimized window
debug falseto generate debug output
debugmask 0xFFF0 set mask to hide debug output
verbose falsemake debugging verbose, sets debug mask to zero
define not setto define a name for conditionals
config not setfilename for a configuration file
help falseto print information

These can be set in default.vmb