8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly

Page Last Altered:

BE93 EXT =

Submitted by Steve Fewell


Set A to 3 (this is the OSARGS action number for 'Set EXT for an open file').

Call &BE99 (in the 'PTR =' routine) to:
* Store A to the 6502 stack
* Check for '#' character ('Missing #' error if not found)
* Get Integer result of expression (file channel number) and store LSB byte to the 6502 stack
* Check for '=' character ('Syntax error' if not found)
* Get the result of expression and convert to Integer (IWA) if Floating-Point value, or issue 'Type mismatch'
   error if String value
* Check for the end of statement ('Syntax error' if ':', '<cr>' or 'ELSE' not found)
* Retrieve Y from the 6502 stack (the file channel number)
* Set X to #&2A (the start of the 4-byte zero page parameter block that holds the new file length (EXT) value)
* Retrieve A from the 6502 stack (this retrieves #&03, the OSARGS action for 'set EXT value')
* Call the Operating System OSARGS routine (&FFDA) to set the EXT value for the open file (specified by channel Y)
* Jump to &9005 to start processing the next command line or program statement

Disassembly for the EXT = routine

BE93   169 003 A9 03 LDA#&03
BE95   128 002 80 02 BRA 2 --> &BE99 Get '#' char, file channel number, '=' char & result of expression and call OSARGS (A=3)


 Back to 8BS