OSBYTE &14 (20) - Explode/implode user defined character font RAM and reset font On entry: X=0: characters &80 to &9F only are redefineable (default without Tube) X=1: characters &80 to &BF are redefineable X=2: characters &80 to &DF are redefineable X=3: characters &80 to &FF are redefineable X=4: characters &20 to &3F, &80 to &FF are redefineable X=5: characters &20 to &5F, &80 to &FF are redefineable X=6: characters &20 to &FF are redefineable (default with Tube) X>6: as with X=6, all characters redefineable On exit: X=&00: font permanently exploded (MOS 3 and later) X=&FF: font explodable/implodable (before MOS 3, ie Electron, BBC, BBC B+) Y=&00: font permanently exploded (MOS 3 and later) Y<>&00: new value OSHWM (not returned across Tube) BBC: X=return value from Service Call &11, &FF if call unclaimed, Y=new OSHWM Master: X=&00, Y=&00 RISC OS: X=&01 (first font bank reset), Y=&03 (number of banks reset) BB4W: X=&20 (character under cursor), Y=&00
In the "imploded" state (X=0) only characters &80-&9F can be redefined with VDU 23, as only 256 bytes is permanently allocated for font definition by the MOS. Other values of X "explode" the RAM and allocate 1 to 6 pages of font RAM pushing up host OSHWM, allowing more characters to be defined.
This OSBYTE must be used with care within a language, as it can reduce the language's memory allocation. Service call &11 is issued to notify ROMs of the change in OSHWM. BASIC does not respond to this, so the *BASIC command should be issued to get it to reset PAGE.
If unexploded, characters &20-&7F are taken from the ROM, and characters &A0-&FF are duplicates of &80-&9F.
When a Tube coprocessor is fitted, the font is fully exploded by default, as this does not take up language memory, but it can be imploded if desired.
OSBYTE &14 with any value of X also resets characters &20-&7F to the ROM font. Characters &80-&FF are not altered, contrary to some manuals.
MOS 3 and later ignores the input value of X. The font is always fully exploded, and the definitions do not take up user memory. The only effect of OSBYTE &14 is to reset characters &20-&7F. Characters &80-&FF are not altered, contrary to some manuals. To reset all characters, OSBYTE &19 should be used.
You should not examine the returned Y value, as OSBYTE calls <128 are defined to only return information in the X register, and only the X register is returned to the user in some environments (such as across the Tube).