OSBYTE &14

From BeebWiki
Revision as of 23:58, 28 August 2013 by WikiSysop (talk | contribs) (1 revision)
Jump to: navigation, search

OSBYTE &14 (20) - Explode/implode user defined character font RAM (exits with X=new value of OSHWM)

Acorn MOS 1.00:

   X=0: characters &80 to &9F only are redefineable (default without Tube)
   X=1: characters &A0 to &BF are also redefineable
   X=2: characters &C0 to &DF are also redefineable
   X=3: characters &E0 to &FF are also redefineable
   X=4: characters &20 to &3F are also redefineable
   X=5: characters &40 to &5F are also redefineable
   X=6: characters &60 to &7F are also redefineable (default with Tube)

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 below 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.

Acorn MOS 3.20 or later:

MOS 3.20 ignores the input value of X, and the output value is undefined. 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.

See Also

Jgharston 21:30, 26 May 2009 (UTC)
KJBracey 15:04, 5 December 2009 (UTC)