8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly


Page Last Altered:

AAE3 OPENOUT

Submitted by Steve Fewell

Description:

Set A to #&80. This is the OSFIND (&FFCE) option to open a file for output access only.
Call routine &AAE9 (part of OPENUP) to obtain the filename and place it in the SWA (or issue 'Type mismatch' error if
a String value was not found), Append a '<cr>' character to the end of the SWA (so that the filename is correctly
terminated for the OSFIND routine's requirements), Set X and Y to point to the SWA (&0600), call OSFIND (&FFCE)
to open the file, and return the opened file's channel number in the IWA.


Disassembly for the OPENOUT routine

AAE3   169 128 A9 80 LDA#&80
AAE5   128 002 80 02 BRA 2 --> &AAE9 Get filename, call OSFIND to open the filename specified in the SWA & set IWA to channel#

 


 Back to 8BS
Or