OSBYTE &47

From BeebWiki
Revision as of 23:19, 18 October 2020 by Jgharston (talk | contribs) (Rewritten.)
Jump to: navigation, search

OSBYTE &47 (71) - Set alphabet or keyboard

On entry: X=&00+n - set or read alphabet (font)
          X=&80+n - set or read keyboard
                n=&00     : set to default
                n=&7F     : read current setting
                n=1-99    : Countries
                n=100-126 : Alphabets

On exit,  X=0   - specified alphabet/keyboard not supported
          X<&80 - previous alphabet/keyboard
          X>&7F - OSBYTE call not supported

While OSBYTE &46 sets both the keyboard and alphabet (font) in one action, this call allows each to be set individually.

Selecting an alphabet redefines the font with VDU 23 sequences. The alphabet can be specified with a country number 0-99, the appropriate alphabet for that country is then selected. Or the alphabet can be selected with the specific alphabet number 100-126. Selecting the default alphabet with X=&00 selects the appropriate alphabet for the currently selected country set with OSBYTE &46.

The keyboard can only be selected by specifying a country number, selecting a keyboard with an alphabet makes no sense. Selecting the default keyboard with X=&80 selects the appropriate keyboard for the currently selected country set with OSBYTE &46.

On 8-bit systems the keyboard number is stored in the OSBYTE &AD variable, on 32-bit systems it is stored in a non-OSBYTE variable.

  • *COUNTRY parses the parameter and calls OSBYTE &46,n
  • *ALPHABET parses the parameter and calls OSBYTE &47,&00+n
  • *KEYBOARD parses the parameter and calls OSBYTE &47,&80+n

Country numbers

   1 UK            13 Unused       25 Russia2      37 Maori
   2 Master or BBC 14 Denmark      26 Israel       
   3 Compact       15 Norway       27 Mexico       48 USA
   4 Italy         16 Iceland      28 LatinAm      49 Wales2
   5 Spain         17 Canada1      29 Australia    50 China
   6 France        18 Canada2      30 Austria      51 Brazil
   7 Germany       19 Canada       31 Belgium      52 SAfrica
   8 Portugal      20 Turkey       32 Japan        53 Korea
   9 Esperanto     21 Arabic       33 MiddleEast   54 Taiwan
  10 Greece        22 Ireland      34 Netherlands
  11 Sweden        23 HongKong     35 Switzerland 
  12 Finland       24 Russia1      36 Wales
  
  When selecting a keyboard:
 125 A4 internal or PC keyboard
 126 Archimedes keyboard

Alphabet numbers

 100 BFont     105 Cyrillic  110 Welsh     115 Latin8
 101 Latin1    106 Arabic    111 UTF8      116 Latin10
 102 Latin2    107 Greek     112 Latin9  
 103 Latin3    108 Hebrew    113 Latin6  
 104 Latin4    109 Latin5    114 Latin7  

Implementation

Implemented in the Master Internationalisation ROM, RISC OS kernel and keyboard handlers, and 8-bit keyboard extensions.

See Also

WikiSysop (talk) 13:32, 8 March 2015 (UTC) Jgharston (talk) 23:19, 18 October 2020 (CEST)