Product specifications
Data Output/Input To/From Tape – Introduction
6.1
In some applications it may be desirable or even necessary to save and load variables
or blocks of memory independently of your programme in files or discrete segments.
For most people who have an MTX at this time the cost of a disk system may be too
much to afford, and therefore the only logical alternative is to perform data file
manipulation on tape.
The MTX cassette system is relatively fast (2400 baud approx), and has proven to be
very reliable in extensive field trials, so this alternative may not be too bad.
Essentially all data I/O is channelled through a routine called INOUT which is located
at £0AAE (Hex). Most of the code written for this section will make use of this routine.
Tape I/O using ROM routines (Assembler)
6.2
The tape I/O ROM routine INOUT located at £0AAE (Hex) on its own, is designed to
save and load blocks of raw data extracted directly from memory and only from the
first BASIC page.
Variable retrieval and page control are taken care of by other routines and are
discussed in later sections.
A memory block save/load routine requires three parameters to be set up prior to
execution. These are listed below:
i. Register pair HL must contain the start address at which data bytes are to be
transferred from/to
ii. Register pair DE must contain the number of bytes which are to be transferred
to/from tape.
iii. Variable TYPE located at £FD68 (Hex) must contain either :
a. 0 – To indicated ‘Save Data’
b. 1 – To indicate ‘Load Data’
A section of code which will save 100 (Decimal) bytes starting from location 10,000
(Decimal) is listed below.
There are several important points to note concerning INOUT:
i. The routine INOUT services the break key during execution. If this option is not
required then the break key must be disabled through the location INTFFF (see
section 5.4)
ii. It does not create any form of tape header label or display any user screen
prompts such as :










