Difference between revisions of "OSBYTE &AC"
m (Link to Keyboard.) |
m (.) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:OSBYTE]]__NOTOC__ | [[Category:OSBYTE]]__NOTOC__ | ||
− | + | {{PageTitle|OSBYTE &AC (172): Read/Write keyboard variables}} | |
''On entry:'' '''newvalue''' = ('''oldvalue''' AND Y) EOR X | ''On entry:'' '''newvalue''' = ('''oldvalue''' AND Y) EOR X | ||
Line 10: | Line 10: | ||
* If Y=%0xxxxxxx, International 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 | With the MOS keyboard driver, the address is the base of the internal keyboard | ||
table. The offsets into the table are the [[Keyboard|internal scan codes]], being | table. The offsets into the table are the [[Keyboard|internal scan codes]], being | ||
Line 22: | Line 22: | ||
them does not change the action of the MOS keyboard driver. | them does not change the action of the MOS keyboard driver. | ||
− | ==== Sideways ROM keyboard driver | + | ===Communicator=== |
+ | The Communicator uses this location to select between .= and *# keys on | ||
+ | the numeric keypad. | ||
+ | |||
+ | ===Sideways ROM keyboard driver=== | ||
A keyboard driver in sideways ROM can use these two locations for its own use | A keyboard driver in sideways ROM can use these two locations for its own use | ||
− | by setting OSBYTE &AD to %10xxxxxx. | + | by setting OSBYTE &AD to %10xxxxxx. These locations then hold: |
+ | * OSBYTE &AC the current keypress | ||
+ | * OSBYTE &AD the keyboard number in b5-b0 | ||
− | + | ===International keyboard driver=== | |
With MOS 3.50 and MOS 5, if Y bit 7 is clear (implying a keyboard table in low | 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. | memory), the MOS keyboard handler issues Service Call &30 to translate keypresses. | ||
With an International Keyboard Driver present: | With an International Keyboard Driver present: | ||
* OSBYTE &AC holds the translated keypress on return from Service Call &30 | * OSBYTE &AC holds the translated keypress on return from Service Call &30 | ||
− | * OSBYTE &AD holds the keyboard number in | + | * OSBYTE &AD holds the keyboard number in b4-b0, and returns the 'NULL needed' flag in b6. |
==See Also== | ==See Also== | ||
− | * [[OSBYTE &AD]] | + | * [[OSBYTE &46]] - Set country (both keyboard and alphabet) |
+ | * [[OSBYTE &47]] - Set keyboard and alphabet | ||
+ | * [[OSBYTE &AC]] - Read/write keyboard handler setting | ||
+ | * [[OSBYTE &AD]] - Read/write keyboard handler setting | ||
+ | * [[OSBYTE &F0]] - Read/write country code | ||
+ | * http://mdfs.net/Docs/Comp/BBC/Osbyte00 | ||
* http://mdfs.net/Docs/Comp/BBC/OsbyteA6 | * http://mdfs.net/Docs/Comp/BBC/OsbyteA6 | ||
+ | * http://mdfs.net/System/ROMs/AcornMOS/Compact511 | ||
[[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) | [[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 21:50, 13 September 2019 (CEST) | ||
+ | [[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 06:40, 12 April 2020 (CEST) | ||
+ | [[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 23:22, 18 October 2020 (CEST) |
Latest revision as of 23:02, 26 August 2024
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 scan codes, 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.
Communicator
The Communicator uses this location to select between .= and *# keys on the numeric keypad.
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. These locations then hold:
- OSBYTE &AC the current keypress
- OSBYTE &AD the keyboard number in b5-b0
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 b4-b0, and returns the 'NULL needed' flag in b6.
See Also
- OSBYTE &46 - Set country (both keyboard and alphabet)
- OSBYTE &47 - Set keyboard and alphabet
- OSBYTE &AC - Read/write keyboard handler setting
- OSBYTE &AD - Read/write keyboard handler setting
- OSBYTE &F0 - Read/write country code
- http://mdfs.net/Docs/Comp/BBC/Osbyte00
- http://mdfs.net/Docs/Comp/BBC/OsbyteA6
- http://mdfs.net/System/ROMs/AcornMOS/Compact511
Jgharston 22:23, 26 May 2009 (UTC) Jgharston (talk) 21:50, 13 September 2019 (CEST) Jgharston (talk) 06:40, 12 April 2020 (CEST) Jgharston (talk) 23:22, 18 October 2020 (CEST)