What actually happens, if a key is pressed, which is then displayed on the screen?
- If a key is pressed the keyboard controller sends the number of the key pressed as well as the state of the key to the CPU.
- The CPU uses both values as an index into a translation table and determines the corresponding character value.
- This value will be used now as an index into the character matrix.
- The CPU calculates the appropriate place on the screen and copies eight bytes from the character matrix to this place.
|
Direct intervention.
- The key code may be read with a XBIOS function (
KM KT GET - 00DAh ).
- The translation tables depend on the OS version.
- The character matrix has a fixed address (
B800h ).
- The screen location may be calculated using the ROLLER RAM (From base address
B600h ).
|
Practical examples2.
Readout the keyboard.
In those days I would like to program an editor, servicing the keyboard I/O on the level of the XBIOS.
Pressing a function key (eg. STOP, AUSBL) should call a corresponding service routine.
In the other case the current ASCII value should be calculated by key number and state.
Look here for a Z80 test tool monitoring a lot of informations when pressing a key.
Saving the keyboard setting.
A tool saving the entire assignment of the keyboard into a file.
This tools finds the address of the translation table by knowledge of the OS version.
Look here for the program.
A look inside the Roller RAM.
The screen of the Joyce is as well known optimally appropriate for a text display.
The individual lines are administrated in the so called Roller RAM.
For the computation of the real video addresses I found two different methods.
Look here for the tool showing both methods work correctly.
Determine a character by a given matrix.
Sometimes you want to know which character ist stored at a dedicated place in the video memory.
The Joyce stores characters as a matrix so a tool recognising the matrix must be used.
Look here for his tool calculating an ASCII character (' ' up to '~' ) from the matrix.
It also recognises attributes, eg. invers video, underlined.
|
|