Hex Availability and OS variable returned ------------------------------------------------------------------------------ &A6 (Acorn MOS 1.20) Read Start of MOS variables On exit X and Y point to the start of the OS variables &A7 (Acorn MOS 1.20) Read Start of MOS variables On exit X=the high byte of OSByte &A6 &A8 (Acorn MOS 1.20) Read address of extended vector table On exit X and Y point to the start of the extended vectors for ROMs &A9 (Acorn MOS 1.20) Read address of extended vector table On exit X=the high byte of OSByte &A8 &AA (Acorn MOS 1.20) Read address of ROM info table On exit X and Y point to the 16 ROM type bytes &AB (Acorn MOS 1.20) Read address of ROM info table On exit X=the high byte of OSByte &AA &AC (Acorn MOS 1.20) Read address of keyboard table On exit X and Y point to a table mapping from internal to ASCII key numbers The shape and layout of the table is of course hardware specific, so this call should be used with caution. Keyboard extensions use this and &AD to store information specific to the keyboard driver. Communicator: Select between .= or #* numeric keypad keys. Internationalisation: &AD (Acorn MOS 1.20) Read address of keyboard table On exit X=the high byte of OSByte &AC &AE (Acorn MOS 1.20) Read address of VDU variables On exit X and Y point to the base of VDU variables for this machine &AF (Acorn MOS 1.20) Read address of VDU variables On exit X=the high byte of OSByte &AE &B0 (Acorn MOS 1.20) Read/Write Tape Timeout This location is decremented on every vsync (50 times per second) and is used with OSByte 19 and to time interblock gaps. (RISC OS 1.00) This location is decremented on every vsync (not necessarily 50 times a second depending on MODE and monitor). &B1 (Acorn MOS 1.20) Read/write input device This returns X=input stream (ie.0 or 1 as defined by OSByte 2). Do not write to this location. &B2 (Acorn MOS 1.20) Enable/Disable Keyboard interrupts A value of 0 disables the keyboard 255 enables the keyboard (Electron OS & RISC OS 3.00) Undocumented &B3 (Acorn MOS 1.20) Read/Write primary OSHWM This value contains the page number of OSHWM ignoring any font implosions and explosions &B4 (Acorn MOS 1.20) Read/Write OSHWM This value contains the page number of OSHWM taking into account any font implosions and explosions &B5 (Acorn MOS 1.20) Read/Write RS423 interpretation A value of 1 (the default) means that RS423 input is taken as raw data 0 means that RS423 is treated as though from the keyboard so that ESCAPE and soft keys are acted on (with their respective events if enabled) &B6 (Acorn MOS 1.20 and Electron OS) Read Font Explosion This value is as set by *FX20 for font implosion/explosion (Acorn MOS 3.20) Read NOIGNORE Status Contains the IGNORE character b7=1=no ignore character b7=0=value is the ignore character &B7 (Acorn MOS 1.20) Read/Write TAPE/ROM switch If 0 then the TAPE filing system is selected 2 then the ROM filing system is selected &B8 (Acorn MOS 1.20) Read MOS copy of Video ULA control register (Electron OS) Undefined &B9 (Acorn MOS 1.20) Read MOS copy of palette register (Electron OS) Read/Write ROM polling semaphore This is the value adjusted by *FX22 and *FX23 &BA (Acorn MOS 1.20) Read/Write ROM active on last BRK The last ROM which caused a BRK is recorded so that the current language ROM can extract the error text (using OSReadROM) if the error text resided in ROM. Since the language ROM would cause the error message to be paged out they should make a RAM copy of the message instead. &BB (Acorn MOS 1.20) Read/Write ROM number of BASIC If b7=1 then the *BASIC command is passed to sideways ROMs via service call 4 &BC (Acorn MOS 1.20) Read current ADC channel number &BD (Acorn MOS 1.20) Highest ADC channel number &BE (Acorn MOS 1.20) Read/Write ADC type A value of 0=the default resolution 8=use only 8 bit resolution (faster) 12=use 12 bit resolution Note The ADC value is scaled to fit 16 bits, it is the resolution which is being set not the range &BF (Acorn MOS 1.20) Read/Write RS423 busy flag Contains 0 for RS423 busy (ie.cassette filing system should not use it) 128 for RS423 free (RISC OS 1.00) Contains no useful information &C0 (Acorn MOS 1.20) Read ACIA control register &C1 (Acorn MOS 1.20) Read/Write flash counter This location is decremented to zero every vsync, when zero the colours are swapped and the next period is entered and decrements until it is zero &C2 (Acorn MOS 1.20) Read/Write first colour duration &C3 (Acorn MOS 1.20) Read/Write second colour duration &C4 (Acorn MOS 1.20) Read/Write auto Repeat Delay &C5 (Acorn MOS 1.20) Read/Write auto Repeat Period &C6 (Acorn MOS 1.20) Read/Write *EXEC file handle A value of zero means no EXECing is happening &C7 (Acorn MOS 1.20) Read/Write *SPOOL file handle A value of zero means no SPOOLing is happening &C8 (Acorn MOS 1.20) Read/Write BREAK/ESCAPE effect Two bits define the action b0=1 Normal ESCAPE effect =0 Escape disabled (except via OSByte 125) b1=1 Memory cleared on next reset =0 Normal reset effect &C9 (Acorn MOS 1.20) Read/Write keyboard Enable/Disable A value of 0 here enables the keyboard,and non zero disables it. The keyboard is still active (see OSByte &B2) but the bytes get thrown away. This is used to implement *REMOTE on the Econet system. &CA (Acorn MOS 1.20) Read/Write Keyboard Status This byte determines the current state of the LOCK keys b0=reserved b1=reserved b2=reserved b3=0=shift not pressed b4=0=caps lock on b5=0=shift lock on b6=0=control not pressed b7=0=shift enable Note With caps lock on and shift enable off, shift has no effect on the letters. (Electron OS) b4=0=caps lock on b5=0=FN key not pressed b6=0=shift not pressed b7=0=control not pressed (RISC OS 1.00) b1=0=scroll lock off b2=0=num lock on b5=reserved &CB (Acorn MOS 1.20) Read/Write RS423 input buffer minimum This is the value the value below which the serial hardware will set the RTS line to stop further characters entering the buffer. Its default is 9 and should be set to match the responsiveness of the software to the speed of the communications &CC (Acorn MOS 1.20) Read/Write RS423 ignore flag A value of zero lets serial data enter the input buffer non zero stops data entering the buffer but will still cause events (Electron OS) Read/Write user key string pointer This points to the currently selected firm key which is being expanded into the input stream. &CD (Acorn MOS 1.20) Read/Write RS423 destination A zero sends data to the RS423 port, and a value of one to the cassette port (Electron OS) Read/Write user key string length The current firm key being expanded into the input stream has this many characters remaining to be sent. Setting it to zero cancels the expansion. Firm keys are the text shortcuts stamped on the side of the keyboard and which are used in conjunction with the FN key. &CE (Acorn MOS 1.20) Read/Write ECONET call intepretation Known OSByte and OSWords are handled by the OS if this value is zero. If b7=1 calls are indirected to the Econet vector instead. &CF (Acorn MOS 1.20) Read/Write ECONET input intepretation Requests to OSReadCharacter are handled by the OS if this value is zero. If b7=1 calls are indirected to the Econet vector instead. &D0 (Acorn MOS 1.20) Read/Write ECONET output intepretation Requests to OSWriteCharacter are handled by the OS if this value is zero. If b7=1 calls are indirected to the Econet vector instead. &D1 (Acorn MOS 1.20) Read/Write speech supression status An &50 here (opcode for 'speak') enables the speehch upgrade, or &20 ('nop') will disable it &D2 (Acorn MOS 1.20) Read/Write sound supression flag A value of zero lets the sound system function as normal non zero disables any sound commands &D3 (Acorn MOS 1.20) Read/Write channel for BELL &D4 (Acorn MOS 1.20) Read/Write volume/ENVELOPE For BELL To set the BELL character to use an envelope, use (envelope-1)*8 To set the BELL volume, and not use envelopes, use 256+((volume-1))*8 The value &90 is *CONFIGURE LOUD and &D0 is *CONFIGURE QUIET (Electron OS) The unexpanded sound system has fixed amplitude. &D5 (Acorn MOS 1.20) Read/Write frequency for BELL &D6 (Acorn MOS 1.20) Read/Write duration for BELL &D7 (Acorn MOS 1.20) Enable/Disable Startup Message The Tube system replaces the startup computer message, and this call is used to do this. It can only be acted on by a paged ROM, since no other software has had a chance to load, only 2 bits are defined: b0=0=supress startup message =1=message as normal b7=0=computer hangs if there's a !Boot file error in the ROM filing system =0=computer hangs if there's a !Boot file error in the DISC filing system &D8 (Acorn MOS 1.20) Read/Write user key string length The current soft key being expanded into the input stream has this many characters remaining to be sent. Setting it to zero cancels the expansion &D9 (Acorn MOS 1.20) Read/Write paged line count This is the number of lines written since the last paged mode lock occured. Paged mode activates when around 75% of the screen has been scrolled &DA (Acorn MOS 1.20) Read/Write VDU Queue length Minus the number of bytes need to complete this VDU command are held in this location. So a command expecting 2 more parameters would have 254 here. Setting this to zero would (for example) clear the queue, preventing an error message having its first few characters lost &DB (Acorn MOS 1.20) Read/Write ASCII code for TAB If the value is between 128 and 255 then TAB will be interpreted according to OSByte &DD-&E3 &DC (Acorn MOS 1.20) Read/Write ASCII for ESCAPE &DD (Acorn MOS 1.20) Read/Write Interpretation ASCII 197-207 A value of 0 discards the keycode A value of 1 expands the key as soft key number (keycode MOD16) A value from 2 to 255 causes chosenvalue + (keycode MOD16) (Acorn MOD 2.00) A value of 2 inserts a 0 followed by the keycode &DE (Acorn MOS 1.20) Read/Write Interpretation ASCII 208-223 See OSByte &DD &DF (Acorn MOS 1.20) Read/Write Interpretation ASCII 224-239 See OSByte &DD &E0 (Acorn MOS 1.20) Read/Write Interpretation ASCII 240-255 See OSByte &DD &E1 (Acorn MOS 0.10) Read/Write Interpretation of F-Keys &E2 (Acorn MOS 0.10) Read/Write Interpretation of Shift-F-Keys &E3 (Acorn MOS 0.10) Read/Write Interpretation of Ctrl-F-Keys &E4 (Acorn MOS 0.10) Read/Write Interpretation of Ctrl-Shift-Fkeys &E5 (Acorn MOS 1.00) Read/Write ESCAPE key status A zero here caused ESCAPE to cause ESCAPE conditions, a value of 1 however causes it to simply insert its ASCII value (usually 27) into the input buffer &E6 (Acorn MOS 1.00) Read/Write ESCAPE effects A zero causes the default ESCAPE effects, ie. when it is acknowledged the active output buffers are flushed, any *EXEC files are closed, the VDU queue is emptied, any pending soft key expansion is cancelled, and the paged mode scroll count is zeroed. A non zero value stops all these effects. &E7 (Acorn MOS 1.00) Read/Write 6522 User IRQ Mask &E8 (Acorn MOS 1.00) Read/Write 6850 IRQ Mask &E9 (Acorn MOS 1.20) Read/Write 6522 System IRQ Mask &EA (Acorn MOS 1.20) Read/Write Tube present flag The value 255 indicates the Tube is present 0 indicates it is not Writing to this value is not recommended &EB (Acorn MOS 1.20) Read/Write speech Processor Pressence The value 255 indicates the TMS5220 is fitted 0 indicates it is not Writing to this value is not recommended SpectROM uses this as an internal call. &EC (Acorn MOS 1.20) Read/Write character output device status This is the location altered by *FX3 &ED (Acorn MOS 1.20) Read/Write Cursor Edit State This is the location altered by *FX4 &EE (Acorn MOS 3.20) Read/Write base of numeric pad The keypad usually generates codes based on offsets from 48 (character 0) This value can be changed with this call &EF (Shadow RAM systems, Acorn MOS 3.20) Read/Write shadow state This location is used by OsByte 111 and 114. The value 0 indicates no shadow screen or shadow screen not selected 1 indicates Electron Master RAM Turbo mode 128 indicates Electron Master RAM 64K mode &F0 (Acorn MOS 3.20 & Electron OS only) Read Country flag A value of 0=UK 1=USA (RISC OS 1.00) Values of 1 UK 2 Master 3 Compact 4 Italy 10 Greece 16 Iceland 22 Ireland 28 LatinAm 5 Spain 11 Sweden 17 Canada1 23 Hong Kong 48 USA 6 France 12 Finland 18 Canada2 24 Russia 7 Germany 13 Unused 19 Canada 25 Russia2 8 Portugal 14 Denmark 20 Turkey 26 Israel 9 Esperanto 15 Norway 21 Arabic 27 Mexico &F1 (Acorn MOS 1.20) Read/Write value written by *FX1 &F2 (Acorn MOS 1.20) Read OS copy of serial ULA register b0..2=determine the receive baud rate b3..5=determine the transmit baud rate b6 =1=RS423 using serial system (instead of cassette) b7 =1=cassette relay on Value 0=19200 baud 1=1200 baud 2=4800 baud 3=150 baud 4=9600 baud 5=300 baud 6=2400 baud 7=75 baud (Electron OS only) Read OS copy of location &FE07 (RISC OS 1.00) b6 and b7 are used to make up the 4th bit of the transmit and receive baud rates, expanding the range of values: Value 9=134.5 10=1800 baud 11=50 baud 12=3600 baud 13=110 baud 14=600 baud 15=undefined &F3 (Acorn MOS 1.20) Read/Write offset to current TIME value A value of X=5 means that TIME copy 1 is being updated A value of X=10 means that TIME copy 2 is being updated Two copies of TIME are required in case the TIME update interrupt occurs part way through a read of TIME - leading to inconsistant values. &F4 (Acorn MOS 1.20) Read/Write soft key consistency flag A zero here indicates the soft key buffer is 'consistant' - ie. it's not currently being updated due to a new soft key being assigned. If a non zero value is present here at reset, the soft keys are cleared. &F5 (Acorn MOS 1.20) Read/Write printer Type This returns the printer number set by *FX5. If written to it does not wait for the current printer to become inactive. &F6 (Acorn MOS 1.20) Read/Write printer Ignore character set by *FX6 &F7 (Acorn MOS 1.20) Intercept BREAK If this location is set to &4C (ie. a JMP instruction) then when reset occurs the address written by OSByte &F8 and &F9 is jumped to (RISC OS 1.00) Define action of BREAK key b0..b1 define action of 'break' alone b2..b3 define action of 'shift break' b4..b5 define action of 'ctrl break' b6..b7 define action of 'ctrl shift break' Each two bit value can be 00=act as a reset 01=act as the ESCAPE key 10=no effect 11=undefined Writing to this value will also update the CMOS copy too &F8 (Acorn MOS 1.20) LSB BREAK intercepter jump address &F9 (Acorn MOS 1.20) MSB BREAK intercepter jump address &FA (Watford 32K RAM) Read/Write RAM board status b0: RAM board active b1: Buffer active b2: Buffer small b3: Buffer large b4: Purging disabled b5: NMI in use b6: Workspace at fixed location b7: ROM claims workspace on BREAK (Morley RAMdisc) Enable/disable RAMdisc b0: 0=ROM enabled, 1=ROM disabled &FA (Acorn MOS 3.20) Read/Write RAM used for VDU access As per OSByte &70. Do not use this for writing &FB (Acorn MOS 3.20) Read/Write RAM used for Display hardware As per OSByte &71. Do not use this for writing &FC (Acorn MOS 1.20) Read/Write current language Rom Number This is the ROM which will be restarted if the machine is soft/hard reset &FD (Acorn MOS 1.20) Read Last Reset Type A value 0=soft reset 1=power on reset 2=hard reset &FE (Acorn MOS 1.20) Read/Write available RAM These bits refer to 16K/32K machine: When read &40=16K &80=32K (Electron OS) This value returns 0 and is otherwise undefined (Acorn MOS 2.00) This value returns 1 and is otherwise undefined (Acorn MOS 3.20) Read/Write effect of shift on Numeric pad A zero in this location makes SHIFT-keypad presses act like their main keyboard counterparts. A nonzero value means shift is ignored. (Extensions) b7-b4 Keyboard keymap is RISC OS (f10-f13=&CA-&CD) or native (RISC OS 1.00) A zero in this location enables both SHIFT and CTRL-keypad presses: For keys 128 and above (ie. the base has been altered with OSByte 238) CTRL-keypad gives keypad key EOR &20 SHIFT-keypad gives keypad key EOR &10 For keys below 128 CTRL and SHIFT are ignored &FF (Acorn MOS 1.20) Read/Write startup Options This is a copy of the keyboard links taken at last hard reset b0..2=screen mode b3 =if clear then the action of SHIFT/BREAK is reversed b4..5=define disk drive speed step time settle time head load b5=0 b4=0 4ms 16ms 0ms b5=0 b4=1 6ms 16ms 0ms b5=1 b4=0 6ms 50ms 32ms b5=1 b4=1 24ms 20ms 64ms b6 =HADFS: 0=drive 1 external, 1=drive 1 internal, via OSWORD &7F b7 =DNFS: 0=NFS priority, 1=DFS priority b7 =ENFS: (Acorn MOS 3.20) On reset this location is set to values read from CMOS RAM