×   Main Menu ALL The 8BS News Manuals (New menu) Links Worth a Look Tools Disc and Basic Webring Site Map 8BS Guestbook Old Guest Book Me The Barnsley Rovers   
8-Bit Software

The BBC and Master Computer Public Domain Library

BDD7 Load/Save named file

Submitted by Steve Fewell

Description:

Call routine &BE41 to obtain the filename, and place it in the SWA, add <cr> character to the end of the filename,
set (&37-&38) to point to the filename and set &39-&3C to the filename load address (PAGE).

Set X (the parameter block starting address) to #&37.
The parameter block (&0037 - &0048) should now contain the following information:
   * &0037-&0038 - Address of filename (the filename is terminated by #&0D).
   * &0039-&003C - Load address of the file (LSB first).
   * &003D-&0040 - Executeable address of the file (LSB first).
   * &0041-&0044 - Start address (if we are saving a file) or the length of file (if not saving)
(LSB first).
   * &0045-&0048 - End address of data save or file attributes (LSB first).
Call OSFILE (&FFDD) to load the specified file.

When loading, locations &003D-&0048 are left blank.


Disassembly for the Load/Save named file routine

BDD7 A 032 065 190 20 41 BE JSR &BE41 Get Filename and set parameter block filename and load address
BDDA d= 100 061 64 3D STZ &3D
BDDC   160 000 A0 00 LDY#&00
BDDE   169 255 A9 FF LDA#&FF
BDE0 7 162 055 A2 37 LDX#&37
BDE2   032 221 255 20 DD FF JSR &FFDD OSFILE
BDE5   ... Check program can be read correctly...

 


 Back to 8BS
Or