Hex Availability and use ------------------------------------------------------------------------------ &80 (Acorn MOS 0.10) Read ADC Channel/Buffer status X=0 returns X=b0 fire button status b1 fire button Y=last ADC channel number read X=1..4 returns X=low byte of ADC channel X Y=high byte of ADC channel X Y=255 X=255 Keyboard buffer level X=254 Serial input buffer level X=253 Serial output buffer level X=252 Printer buffer level X=251 Sound channel 0 buffer level X=250 Sound channel 1 buffer level X=249 Sound channel 2 buffer level X=248 Sound channel 3 buffer level X=247 Speech buffer level (VFS) X=5 maximum mouse X threshold (where the pointer changes shape) X=6 maximum mouse Y threshold (where the pointer changes shape) X=7 buffered mouse X position X=8 buffered mouse Y position X=9 mouse buttons b0=left b1=centre b2=right (RISC OS 1.00) X=7 buffered mouse X position X=8 buffered mouse Y position Y=255 X=246 Mouse buffer level &81 (Acorn MOS 0.10) Read Key with Time Limit (do INKEY) Action: Scan for any key within time limit X=0..255 Y=0..127 On exit Y=0 C=0 means X contains ASCii value of the character read Y=255 C=1 timed out Y=27 C=1 ESCAPE was pressed Action: Read OS version X=0 Y=255 On exit X=value identifying OS X=0 BBC B with MOS 0.10 X=1 Acorn Electron MOS X=244 Master 128 MOS 3.26 X=245 Compact X=247 Master ET X=250 Acorn ABC X=251 BBC B+ 64/128 (MOS2.00) X=252 BBC Micro (West German MOS) X=253 Master 128 MOS 3.20 X=254 BBC Micro (American MOS 1.10) X=255 BBC Micro OS1.00/1.20 X=&A0 Arthur 1.20 X=&A1 RISC OS 2.00 X=&A2 RISC OS 2.01 X=&A3 RISC OS 3.00 X=&A4 RISC OS 3.10 and 3.11 X=&A5 RISC OS 3.50 X=&A6 RISC OS 3.60 X=&A7 RISC OS 3.70 X=&A8 RISC OS 3.80 (publically released as 4.0x) X=&A9 RISC OS 4 Select X=&AA RISC OS 5.0X Action: Scan for a range of keys X=1..127 lowest internal key number to start at EOR&7F Y=255 On exit X=internal key number pressed (or 255 for none) Action: Scan for a particular key X=128..255 internal key number to scan for EOR&80 Y=255 On exit X=Y=0 for not pressed X=Y=255 the key was being pressed &82 (Acorn MOS 0.10) Read High Order Address Returns X=lo byte of 32 bit address of this machine Y=hi byte of 32 bit address of this machine ie.this machine's 32 bit address is &YYXX0000 upwards &83 (Acorn MOS 0.10) Read OSHWM This returns the value of 'PAGE' in X and Y &84 (Acorn MOS 0.10) Read base of display RAM On exit X and Y point to the first byte of screen RAM &85 (Acorn MOS 0.10) Read base of display RAM for a given mode X=mode number On exit X and Y point to the first byte of screen RAM if MODE X were chosen &86 (Acorn MOS 0.10) Text cursor position Returns X and Y of the current cursor position (or input cursor if in editing mode due to cursor keys) &87 (Acorn MOS 0.10) Character at text cursor and screen MODE On exit X=character at current cursor position (or 0 if unreadable) Y=current mode number (shadow modes DO NOT return with bit 7 set) &88 (Acorn MOS 1.00) Perform *CODE The call performs a JSR to the current location of USERV,with X and Y set to whatever the OSByte was called with &89 (Acorn MOS 0.10) Cassete Motor Control X=0 relay turned off X=1 relay turned off The default tape filing system enters with Y=0 for write operations and Y=1 for read operations.Hence,a machine could be adapted to have seperate read and write drives. &8A (Acorn MOS 1.00) Place character into buffer X=buffer number Y=character to place &8B (Acorn MOS 0.10) Set filing system attributes (do *OPT) This call is a direct equivalent to *OPTx,y &8C (Acorn MOS 0.10) Select Tape FS at 1200/300 baud (do *TAPE) X=0 perform *TAPE and select default speed (1200) X=3 perform *TAPE at 300 baud X=12 perform *TAPE at 1200 baud &8D (Acorn MOS 1.00) Select RFS (do *ROM) &8E (Acorn MOS 1.00) Enter Langauge ROM X=socket number that the language ROM is in If the Tube is active the ROM will be copied across to the coprocessor The call does not return as the language resets the stack (Acorn MOS 3.20) If the ROM has been unplugged this will have no effect,or if the ROM is not a language ROM the error 'This is not a language' will be raised (Acorn MOS 3.50) If called with X=64+socket number then the ROM will not be relocated when being transferred to the Tube and there is a relocation table present. &8F (Acorn MOS 1.00) Issue SWR Service Request (on exit Y=response to request if appropriate) X=request number Y=parameter to pass (varies depending on the request number) &90 (Acorn MOS 0.10) Set TV offset and interlacing (do *TVx,y) X=vertical screen shift Y=0/1 to turn off/on interlacing On exit X and Y contain the old value.The settings will be effected on the next MODE change &91 (Acorn MOS 1.00) Read character from buffer X=buffer number On exit Y=character got,or C=1 if the buffer was empty (RISC OS 1.00) If the chosen buffer is X=9 (mouse) then interrupts should be disabled while inserting bytes into the buffer incase the real mouse starts to put bytes at the same time. Top bit set characters should be entered into the keyboard buffer preceded by a byte 0 to prevent them from being mistaken for F key presses or ALT and CTRL key shortcuts. &92 (Acorn MOS 1.00) Read FRED X=offset within page &FC.On exit Y=byte read &93 (Acorn MOS 1.00) Write FRED X=offset within page &FC and Y=byte to write &94 (Acorn MOS 1.00) Read JIM X=offset within page &FD.On exit Y=byte read &95 (Acorn MOS 1.00) Write JIM X=offset within page &FD and Y=byte to write &96 (Acorn MOS 1.00) Read SHELIA X=offset within page &FE.On exit Y=byte read &97 (Acorn MOS 1.00) Write SHELIA X=offset within page &FE and Y=byte to write &98 (Acorn MOS 1.20) Examine Buffer Status X=buffer number On exit C=0 Y=offset from address held at &FA to the next byte to get C=1 buffer empty (Acorn MOS 2.00) The Y register actually contains the next value,not just an offset as with the earlier OS. Note Interrupts should be disabled during this call to ensure the interrupt routine doesn't alter the buffer while you're reading it This OSByte doesn't actually remove the byte No range checking is performed on the buffer number and non existant buffer numbers have undefined results &99 (Acorn MOS 1.20) Write character into input buffer checking for ESCAPE X=buffer number Y=byte to insert On exit C=1=buffer was full If Y is the ESCAPE character,then no keyboard event will happen as an ESCAPE condition (hence ESCAPE event) are in progress. &9A (Acorn MOS 1.20) Write to Video ULA control register and RAM copy This call places X into register 0 of the 6845,and updates the RAM copy (Electron OS only) Reset flashing colours This call forces the ULA to set any flashing colours back to the first of the two (the 'mark' colour) &9B (Acorn MOS 1.20) Write to Video ULA palette register and RAM copy This call places X into register 1 of the 6845,and updates the RAM copy (Electron OS only) Completely ignored,performing an RTS immediately &9C (Acorn MOS 1.20) Read/write ACIA registers Y=255 to read X=b0..1 0=use basic baud rate 1=use chosen baud rate/16 2=use chosen baud rate/64 3=reset transmit,receive,control registers b2..4 0=7 bit,even parity,2 stop bits (7E2) 1=7 bit,odd parity,2 stop bits (7O2) 2=7 bit,even parity,1 stop bits (7E1) 3=7 bit,odd parity,1 stop bit (7O1) 4=8 bit,no parity,2 stop bits (8N2) 5=8 bit,no parity,1 stop bits (8N1) 6=8 bit,even parity,1 stop bits (8E1) 7=8 bit,odd parity,1 stop bit (8O1) b5..6 0=RTS low,transmit interrupt disabled 1=RTS low,transmit interrupt enabled 2=RTS high,transmit interrupt disabled 3=RTS low,transmit interrupt disabled,break level on transmit data b7 0=receive interrupt disabled 1=receive interrupt enabled Y=0 to write X=as above (RISC OS 1.00) X=b0..1 0=no effect 1=no effect 2=no effect (Electron OS only) Passed as an unknown osbyte to the paged ROMs &9D (Acorn MOS 1.20) Fast Tube BPUT X=byte to write Y=file handle In OS 1.20 this call simply passes through the normal OSBPUT routine &9E (Acorn MOS 1.20 & Acorn MOS 2.00 only) Read from Speech Processor Either Y=speech chip status register Y=byte read from PHROM if a 'read command' was previously written (Electron OS only) Passed as an unknown osbyte to the paged ROMs &9F (Acorn MOS 1.20 & Acorn MOS 2.00 only) Write to Speech Processor Y=data to write (Electron OS only) Passed as an unknown osbyte to the paged ROMs &A0 (Acorn MOS 1.20) Read VDU Variable This call returns variable number X in registers X and Y In OS 1.20 the data starts at &300,but this is machine dependant (Electron OS only) Undefined action &A1 (Acorn MOS 3.20) Read CMOS RAM X=byte to read and on exit Y=byte read On the Master Compact calling with X=255 returns the EEPROM device size in Y=0,127,or 255. This represents no EEPROM,128,or 256 byte fitted. &A2 (Acorn MOS 3.20) Write CMOS RAM X=byte to read with Y=byte to write &A3 (Various) Reserved for applications software (Acornsoft GXR 1.20) X=242 Y=0 resets the dot-dash pattern & length to defaults Y=1..64 set dot dash pattern repeat length Y=65 return status returns X=b0..5 current dot dash pattern repeat length (0 means 64 though) b6 if set flood fill is always active b7 if set GXR ROM is turned on Y=number of pages allocated to sprites Y=66 return info on current sprite returns X=pixel width Y=pixel height if X=Y=0 then the ROM is not fitted,or no sprite is selected (RISC OS 1.00) X=242 Y=0 resets the dot-dash pattern & length to defaults Y=1..64 set dot dash pattern repeat length Y=65 return status returns X=b0..5 current dot dash pattern repeat length (0 means 64 though) b6 if set flood fill is always active b7 if set sprites are always active Y=66 return info on current sprite returns X=pixel width Y=pixel height &A4 (Acorn MOS 3.20) Check Processor Type X and Y point to the code to check If the value at offset &07 is not a language ROM the error 'This is not a language' is raised If the value at offset &08 (bits 0..3) is not 6502 code or BASIC then the error 'I cannot run this code' is raised &A5 (Acorn MOS 3.20) Read output Cursor Position On exit X and Y are the output cursor position used during cursor editing