X is mainly a C program, compiled with Misosys C (MC can be found on Tim Mann's site, thanks to him and Roy Soltoff). To improve speed and size parts are inline assembly. The combined source amounts to about 64K where about half is source to generate libraries.
The configurable graphics refers to the frame drawing, where these characters are pulled from a table at 5332H consisting of 8 bytes; upper left, upper, upper right, left, right, lower left and lower right. These bytes will be the exact byte that is copied into the screen ram.
The configurable keys are split into two tables one for the main part and another for the editing. In both there is the consept of range too and since the tables are executed sequentially there can be overlapping between entries.
A key entry consists of a key code and a function code
10, 0 means that the down arrow will result in the Down function
A range entry consist of a range marker (0), a range low, a range high and a function code
0, 97, 122, 12 means that range from 'a' to 'z' (shift-A to shift-Z)
will result in the Search function
(Note: Remove the other lowercase entries first)
Each table starts with a count of key/range entries to execute and a dummy (0)
29, 0 means that the table contains 29 entries
The main key table starts at 66A2H and can be up to 100 bytes including count and dummy. (49 key entries or 47 key entries and 1 range entry).
Down | 0 |
Up | 1 |
Pagedown | 2 |
Pageup | 3 |
Bottom | 4 |
Top | 5 |
Toggle | 6 |
Transfer | 7 |
Transfer with edit | 8 |
Reread | 9 |
Disk | 10 |
Filter | 11 |
Search | 12 |
Order | 13 |
The editing key table starts at 662EH and can be 40 bytes including
count and dummy. (19 key entries etc.).
Ignore | 0 |
Left | 1 |
Right | 2 |
Backspace | 3 |
Delete | 4 |
Insert | 5 |
Toggle | 6 |
Execute | 7 |
Cancel | 8 |