Difference between revisions of "OSBYTE &AC"
(Added Internation keyboard info.) |
(Wrote up fuller details.) |
||
Line 1: | Line 1: | ||
− | [[Category:OSBYTE]] | + | [[Category:OSBYTE]]__NOTOC__ |
− | OSBYTE &AC (172) - Read address of keyboard table | + | == OSBYTE &AC (172) - Read address of keyboard translation table == |
+ | ''On entry:'' '''newvalue''' = ('''oldvalue''' AND Y) EOR X | ||
− | On exit | + | '' On exit:'' YX=address of keyboard transation table. The top bits indicate if the |
− | The | + | MOS keyboard driver is being used or an alternative keyboard driver is being used. |
− | |||
− | With | + | * If Y=%11xxxxxx, MOS keyboard driver |
− | + | * If Y=%10xxxxxx, sideways ROM keyboard driver | |
+ | * If Y=%0xxxxxxx, International keyboard driver. | ||
+ | |||
+ | ==== MOS keyboard driver ==== | ||
+ | With the MOS keyboard driver, the address is the base of the internal keyboard | ||
+ | table. The offsets into the table are the internal key numbers, being the | ||
+ | negative INKEY number EOR 255, so 'Q' is key number &10, etc. | ||
+ | |||
+ | An entry of &00 is translated to the current TAB character set with | ||
+ | [[OSBYTE &DB|OSBYTE 219]]. The entries for CAPSLOCK and SHIFTLOCK hold &01 and &02, | ||
+ | but these are never used as the MOS checks for these two keys explicitly. | ||
+ | |||
+ | The MOS never uses the values returned by OSBYTE &AC and &AD, so changing | ||
+ | them does not change the action of the MOS keyboard driver. | ||
+ | |||
+ | ==== Sideways ROM keyboard driver ==== | ||
+ | A keyboard driver in sideways ROM can use these two locations for its own use | ||
+ | by setting OSBYTE &AD to %10xxxxxx. | ||
+ | |||
+ | ==== International keyboard driver ==== | ||
+ | With MOS 3.50 and MOS 5, if Y bit 7 is clear (implying a keyboard table in low | ||
+ | memory), the MOS keyboard handler issues Service Call &30 to translate keypresses. | ||
+ | With an International Keyboard Driver present: | ||
+ | * OSBYTE &AC holds the translated keypress on return from Service Call &30 | ||
+ | * OSBYTE &AD holds the keyboard number in b5-b0, and returns the 'NULL needed' flag in b6. | ||
==See Also== | ==See Also== | ||
+ | * [[OSBYTE &AD]] | ||
* http://mdfs.net/Docs/Comp/BBC/OsbyteA6 | * http://mdfs.net/Docs/Comp/BBC/OsbyteA6 | ||
[[User:Jgharston|Jgharston]] 22:23, 26 May 2009 (UTC) | [[User:Jgharston|Jgharston]] 22:23, 26 May 2009 (UTC) | ||
+ | [[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 21:50, 13 September 2019 (CEST) |
Revision as of 20:50, 13 September 2019
OSBYTE &AC (172) - Read address of keyboard translation table
On entry: newvalue = (oldvalue AND Y) EOR X
On exit: YX=address of keyboard transation table. The top bits indicate if the MOS keyboard driver is being used or an alternative keyboard driver is being used.
- If Y=%11xxxxxx, MOS keyboard driver
- If Y=%10xxxxxx, sideways ROM keyboard driver
- If Y=%0xxxxxxx, International keyboard driver.
MOS keyboard driver
With the MOS keyboard driver, the address is the base of the internal keyboard table. The offsets into the table are the internal key numbers, being the negative INKEY number EOR 255, so 'Q' is key number &10, etc.
An entry of &00 is translated to the current TAB character set with OSBYTE 219. The entries for CAPSLOCK and SHIFTLOCK hold &01 and &02, but these are never used as the MOS checks for these two keys explicitly.
The MOS never uses the values returned by OSBYTE &AC and &AD, so changing them does not change the action of the MOS keyboard driver.
Sideways ROM keyboard driver
A keyboard driver in sideways ROM can use these two locations for its own use by setting OSBYTE &AD to %10xxxxxx.
International keyboard driver
With MOS 3.50 and MOS 5, if Y bit 7 is clear (implying a keyboard table in low memory), the MOS keyboard handler issues Service Call &30 to translate keypresses. With an International Keyboard Driver present:
- OSBYTE &AC holds the translated keypress on return from Service Call &30
- OSBYTE &AD holds the keyboard number in b5-b0, and returns the 'NULL needed' flag in b6.
See Also
Jgharston 22:23, 26 May 2009 (UTC) Jgharston (talk) 21:50, 13 September 2019 (CEST)