MOS Variables
Categories:
OSByte call | Action | Available on: | |||
---|---|---|---|---|---|
(dec) | (hex) | BBC | Master | Electron | |
166 | A6 | Read start address of OS variables low byte | x | x | x |
167 | A7 | Read start address of OS variables high byte | x | x | x |
168 | A8 | Read address of ROM pointer table low byte | x | x | x |
169 | A9 | Read address of ROM pointer table high byte | x | x | x |
170 | AA | Read address of ROM information table low byte | x | x | x |
171 | AB | Read address of ROM information table high byte | x | x | x |
172 | AC | Read address of keyboard translation table low byte | x | x | x |
173 | AD | Read address of keyboard translation table high byte | x | x | x |
174 | AE | Read VDU variables origin low byte | x | x | x |
175 | AF | Read VDU variables origin high byte | x | x | x |
176 | B0 | Read/Write CFS timeout counter | x | x | x |
On exit:
A | preserved |
---|---|
X | Old value |
C | undefined |
The OSBYTE calls &A6 to &FF (166-255) read and write the MOS variables.
Reading & writing the variables are handled by the formula:
newValue = (oldValue AND Y) EOR X
The all return the old value in X and the next location in Y.
MOS Variables
The MOS variables start in memory from address &0236.
Each variable is accessible via OSBYTE calls 166..255.
The internal label .mosVariablesMinus166
refers to the address &0190 (= &0236-166) so that the lookup
is done by simply adding the accumulator to that address.
OSBYTE | Variable | Address | Description |
---|---|---|---|
166/167 | mosVariables | 0236 | Constant value .mosVariablesMinus166 |
168/169 | romPointerTable | 0238 | Constant value .extendedVectorSpace |
170/171 | romPointerTable | 023A | Constant value .extendedVectorSpace |
172/173 | key translation table | 023C | Constant value .extendedVectorSpace |
Last modified October 6, 2021: Move BBC content into subdirectory to allow more bbc content (23080e8)