Difference between revisions of "OSBYTE &19"
(Reset BBC font without changing PAGE.) |
|||
Line 25: | Line 25: | ||
==Example code== | ==Example code== | ||
− | On MOS 3 and later the font is always exploded, on earlier MOSs (Electron, BBC, BBC B+) OSBYTE &19 does not exist, [[OSBYTE &14]] explodes the font and resets it. The following code will reset the whole font regardless of what machine the code is running on. OSBYTE 25 - if it exists - resets all characters, then *FX20,6 resets characters &20-&7F. OSBYTE 25 has to be called via OSBYTE as *FX25 will give an error if not present. | + | On MOS 3 and later the font is always exploded, on earlier MOSs (Electron, BBC, BBC B+) OSBYTE &19 does not exist, [[OSBYTE &14]] explodes the font and resets it. The following code will reset the whole font regardless of what machine the code is running on. OSBYTE 25 - if it exists - resets all characters, then *FX20,6 resets characters &20-&7F. OSBYTE 25 has to be called via OSBYTE as *FX25 will give an error if it is not present. |
===BASIC=== | ===BASIC=== | ||
− | A%=FNbyte(25 | + | A%=FNbyte(25,0):*FX20,6 |
− | + | ||
+ | if you want to leave the explosion state unchanged on the BBC and not overwrite memory at PAGE: | ||
+ | A%=FNbyte(25,0):A%=FNbyte(20,FNbyte(182,&FF00)) | ||
+ | |||
using: | using: | ||
− | DEFFNbyte(A%,X% | + | DEFFNbyte(A%,X%):LOCAL Y%:Y%=X%DIV256:=((USR&FFF4)AND&FF00)DIV256 |
===6502=== | ===6502=== | ||
LDA #25:LDX #0:JSR OSBYTE :\ try 'reset all font' | LDA #25:LDX #0:JSR OSBYTE :\ try 'reset all font' | ||
LDA #20:LDX #6:JSR OSBYTE :\ 'explode full font' | LDA #20:LDX #6:JSR OSBYTE :\ 'explode full font' | ||
+ | |||
+ | if you want to leave the explosion state unchanged on the BBC and not overwrite memory at PAGE: | ||
+ | LDA #25:LDX #0:JSR OSBYTE :\ try 'reset all font' | ||
+ | LDA #182:LDX #0:LDY #&FF:JSR OSBYTE :\ Read current explosion state | ||
+ | LDA #20:JSR OSBYTE :\ 'explode full font' | ||
+ | |||
+ | On the Master and later [[OSBYTE &B6|OSBYTE 182]] reads the NoIgnore status, but the value returned is ignored by the following [[OSBYTE &14|OSBYTE 20]]. | ||
==See Also== | ==See Also== | ||
* [[OSBYTE &14]] explode fonts | * [[OSBYTE &14]] explode fonts | ||
* http://mdfs.net/Docs/Comp/BBC/Osbyte00 | * http://mdfs.net/Docs/Comp/BBC/Osbyte00 |
Revision as of 09:51, 9 September 2015
Contents
OSBYTE &19 (25) - Reset a group of font definitions On entry: X=0 resets 32-255 X=1 resets 32-63 X=2 resets 64-95 X=3 resets 96-127 X=4 resets 128-159 X=5 resets 160-191 X=6 resets 192-223 X=7 resets 224-255 On exit: X=&FF: OSBYTE &19 unsupported X=preserved: subcall unsupported X=&00: subcall actioned
OSBYTE &19 (25) - Watford Speech: Output a speech allophone On entry: Y=0 X=allophone number - output allophone Y=1 X=word number - output a word from dictionary 1 Y=2 X=word number - output a word from dictionary 1 Y=3 X=word number - output a word from dictionary 1 Y>3 - ignored, allowing other ROMs to respond to and pass to OSBYTE &19,x,0
Example code
On MOS 3 and later the font is always exploded, on earlier MOSs (Electron, BBC, BBC B+) OSBYTE &19 does not exist, OSBYTE &14 explodes the font and resets it. The following code will reset the whole font regardless of what machine the code is running on. OSBYTE 25 - if it exists - resets all characters, then *FX20,6 resets characters &20-&7F. OSBYTE 25 has to be called via OSBYTE as *FX25 will give an error if it is not present.
BASIC
A%=FNbyte(25,0):*FX20,6 if you want to leave the explosion state unchanged on the BBC and not overwrite memory at PAGE: A%=FNbyte(25,0):A%=FNbyte(20,FNbyte(182,&FF00)) using: DEFFNbyte(A%,X%):LOCAL Y%:Y%=X%DIV256:=((USR&FFF4)AND&FF00)DIV256
6502
LDA #25:LDX #0:JSR OSBYTE :\ try 'reset all font' LDA #20:LDX #6:JSR OSBYTE :\ 'explode full font' if you want to leave the explosion state unchanged on the BBC and not overwrite memory at PAGE: LDA #25:LDX #0:JSR OSBYTE :\ try 'reset all font' LDA #182:LDX #0:LDY #&FF:JSR OSBYTE :\ Read current explosion state LDA #20:JSR OSBYTE :\ 'explode full font'
On the Master and later OSBYTE 182 reads the NoIgnore status, but the value returned is ignored by the following OSBYTE 20.
See Also
- OSBYTE &14 explode fonts
- http://mdfs.net/Docs/Comp/BBC/Osbyte00