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 &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 (Acorn MOS 3.20) Read/Write ROM polling semaphore This is the value adjusted by *FX22 and *FX23 &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 &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 implies no EXECing is happening &C7 (Acorn MOS 1.20) Read/Write *SPOOL file handle A value of zero implies 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.But with shift enable on,you get lowercase.This cannot be achieved at the keyboard and the OSByte must be used. (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 in 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 set to 128 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 set to 128 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 set to 128 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 speech 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 143 then TAB will act as a softkey (RISC OS 1.00) If the value is between 128 and 255 inclusive and TAB is used in conjuction with control or shift its value is SHIFT'd returns code EOR16 CTRL'd returns code EOR32 (Electron OS only) Read/Write external sound semaphore Determines whether SOUND and ENVELOPE trigger unknown OSWord service calls to the paged ROMs to allow extra sound hardware to be added. &DC (Acorn MOS 1.20) Read/Write ASCii for ESCAPE &DD (Acorn MOS 1.20) Read/Write Intrepretation 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 MOS 3.50) A value of 2 preceeds the keycode with an ASCii null &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 (Acorn MOS 1.00 and Acorn MOS 2.00 only) Cancel VDU queue Only works with X=Y=0 on entry (ie.writes a zero) &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 causes ESCAPE to cause ESCAPE conditions,a value of 1 however causes it to simply insert it's 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 presence The value 255 indicates the TMS5220 is fitted 0 indicates it is not Writing to this value is not recommended &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 (Acorn MOS 3.20) Read/Write shadow state This is a readable/writeable equivalent to OSByte 114 &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 (Acorn MOS 3.20) Read/Write RAM used for VDU access As per OSByte &70.Do not use this for writing (Watford 32K shadow RAM) Read/Write shadow RAM board status b0=1=RAM board active b1=1=buffer active b2=1=small buffer b3=1=large buffer b4=1=buffer purging disabled b5=1=NMI in use b6=1=workspace at fixed location b7=1=ROM claims workspace on next BREAK &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 non zero value means shift is ignored. (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. Note that the switch numbers printed on the circuit board are numbered backwards (so switch 8 is b0, switch 7 is b1, etc...). By default the keyboard has no switch fitted and the links read back as all 1's ('open'). b0..2=select screen mode b3 =if clear then the action of SHIFT/BREAK is reversed b4..5=define disc drive speed step time settle time head load 00: 4ms 16ms 0ms 01: 6ms 16ms 0ms 10: 6ms 50ms 32ms 11: 24ms 20ms 64ms b6=reserved b7=when both Econet and disc hardware are installed DNFS checks this bit. If clear NFS will be selected instead of DFS, and vice versa. (Acorn MOS 3.20) Only b3 is of use,the rest of the settings are now in CMOS RAM (Electron OS) Only b0..3 are of use,since the unexpanded Electron has no disc interface