Difference between revisions of "OSBYTE &14"

From BeebWiki
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
[[Category:OSBYTE]]
 
[[Category:OSBYTE]]
OSBYTE &14 (20) - Explode/implode user defined character font RAM (exits with X=new value of OSHWM)
+
  OSBYTE &14 (20) - Explode/implode user defined character font RAM and reset font
 
+
  On entry:
'''Acorn MOS 1.00:'''
 
 
 
 
     X=0: characters &80 to &9F only are redefineable (default without Tube)
 
     X=0: characters &80 to &9F only are redefineable (default without Tube)
 
     X=1: characters &A0 to &BF are also redefineable
 
     X=1: characters &A0 to &BF are also redefineable
Line 11: Line 9:
 
     X=5: characters &40 to &5F are also redefineable
 
     X=5: characters &40 to &5F are also redefineable
 
     X=6: characters &60 to &7F are also redefineable (default with Tube)
 
     X=6: characters &60 to &7F are also redefineable (default with Tube)
 +
  On exit:
 +
    X=&00:  font permantly exploded (MOS 3 and later)
 +
    X=&FF:  font explodable/implodable (before MOS 3, ie Electron, BBC, BBC B+)
 +
    Y=&00:  font permantly exploded (MOS 3 and later)
 +
    Y<>&00: new value OSHWM (not returned across 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.
 
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.
Line 22: Line 25:
 
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.
 
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 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.
  
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.
+
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).
  
 
==See Also==
 
==See Also==
 +
* [[OSBYTE &19]] reset font
 
* http://mdfs.net/Docs/Comp/BBC/Osbyte00
 
* http://mdfs.net/Docs/Comp/BBC/Osbyte00
  
 +
[[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 14:13, 31 August 2015 (UTC)
 
[[User:Jgharston|Jgharston]] 21:30, 26 May 2009 (UTC)<br>
 
[[User:Jgharston|Jgharston]] 21:30, 26 May 2009 (UTC)<br>
 
[[User:KJBracey|KJBracey]] 15:04, 5 December 2009 (UTC)
 
[[User:KJBracey|KJBracey]] 15:04, 5 December 2009 (UTC)

Revision as of 15:13, 31 August 2015

 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 &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)
 On exit:
   X=&00:  font permantly exploded (MOS 3 and later)
   X=&FF:  font explodable/implodable (before MOS 3, ie Electron, BBC, BBC B+)
   Y=&00:  font permantly exploded (MOS 3 and later)
   Y<>&00: new value OSHWM (not returned across 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.

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

See Also

Jgharston (talk) 14:13, 31 August 2015 (UTC) Jgharston 21:30, 26 May 2009 (UTC)
KJBracey 15:04, 5 December 2009 (UTC)