Nascom Newsletter |
Volume 3 · Number 3 · August 1983 |
Page 5 of 37 |
---|
Write a file to cassette tape preceded by a file label containing the specified file name. The file label will be recognised and displayed by the SYS-EX commands ‘q’, ‘r’ and ‘v’.
As the command uses the NAS-SYS Write command to write the file itself, the format is compatible with files written using the NAS-SYS ’W’ command. If required, the NAS-SYS ‘R’ and ‘V’ commands may be used to read and verify files written by the SYS-EX ‘w’ command, although the file label will be ignored by NAS-SYS. The content of memory from address AAAA up to but not including BBBB, is the file which is written to the Cassette tape.
After entry of the ‘w’ command, the prompt ‘wName:’ appears on the next screen line and the name of the file to be written is entered on that line. The tape drive LED is then switched on and after about two seconds (4MHz), the file label followed by the file itself is sent to the serial output port for writing to tape. Finally, the tape drive LED is switched off.
The format of the file label is as follows: 3 x D3H, 0 to 42 characters of file name, 1 space (00H if name length is 42), 00H.
AAAA – first memory address to be written to
tape.
BBBB – one beyond the last memory address to be
written to tape.
Many of the comments for the related SYS-EX commands (&lsquoMl’, ‘q’, ‘r’, ‘s’, ‘v’) are of use in understanding the operation and usage of the ‘w’ command.
A file written using the SYS-EX ‘w’ command will be recognised in the 8K Basic by both the CLOAD command and the SYS-EX Basic named file facility. However, the file is unlikely to be an acceptable Basic program file and problems could therefore result if it was read into memory during the execution of Basic.
Call user routine number 1
Calls a user routine whose execution address has been stored in the NAS-SYS argument ARG8.
The execution address may be set either by entering the appropriate number of arguments (8,9 or 10) on a command line, or by using the SYS-EX ‘u’ command. If the execution address has a value of 0000H, the command is rejected and an error message is displayed.
On entry to the user routine the NAS-SYS stack is in use. Care should therefore be taken to ensure that: (i) higher addresses on the stack are not corrupted, and (ii) the maximum depth of the stack is not exceeded. A return to SYS-EX may be made by executing a Z80 RET instruction. If the carry flag is set upon return to SYS-EX, the message ‘Error’ is displayed on the screen prior to the acceptance of further input.
Page 5 of 37 |
---|