Commodore 2001-8 User Manual page 84

Table of Contents

Advertisement

process normally
end of data processed with no errors
in the appropriate times andlor if it ceases to respond by means of bringing NRFD and NDAC both high, a
write error indication Is given in bit o.
The third error occurs when during read on an IEEE-488, the IEEE device has not sent DAV in less than 65
milliseconds; bit 1 of the status word is then set. Whenever the EOI line is encountered, the subroutine
sets the bit 6 on in the status word and continues to force carriage returns.
TAPE UNIT ERRORS
The cassette only checks data on read. The errors deleted are:
1) SHORT BLOCK (4).When reading a block from tape, a spacer tone was
encountered before the expected number of bytes has been read from that
block. Possible cause: attempting to read a short load file as a data record.
2) LQ}IG BLOCK (B).When reading a block from tape, a spacer tone was not
encountered after the expected number of bytes had been read from that
block. Possible cause: reading a long load file as data.
3) UNRECOVERABLE READ ERROR (16).Cause: more than 31 errors on the
first block of redundant blocks-or an error that could not be corrected
because it occured in the same place in both blocks.
4) CHECKSUM ERROR (32).After a LOAD or reading of data, a checksum is
computed over the bytes in RAM and compared to a byte received from the
input device. If they do not match, this bit is set.
5) END OF FILE (64).This bit is set when the end of data file mark is
encountered in a tape record.
6) END OF TAPE (-128).An EOT record was read.
EXAMPLES OF ST USE
As you can see, there is no status that the PET detects for the writing of tapes, nor errors detected for
printing to and reading from the screen. There is an error on writing data out to the IEEE-488 and there is
also a series of errors detected on inputting from the IEEE-488 or from tape.
The normal programming technique is to follow IN PUT# or a GET# by either a test or storage of the value,
of status. As this is only a single byte of memory and the status changes on each new I/O command, the
status is very transient.
100INPUT#2,A
110INPUT#5,B
120 IF ST=OTHEN 200
This code only checks the result of the transfer of data from logical file 5. The results of reading logical
file 2 is forever lost. Similarly:
100INPUT#2,A
110 PRINT A
120 IF ST=OTHEN 200
In this case, the ST reflects the print status, rather than the results of reading #2.
A correct way to use ST is the folllowing:
100INPUT#2,A,B,C
110 IF ST=OTHEN 200
120 IF ST = 64 THEN 300
81

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pet 2001-8

Table of Contents