CHANGE.FILE V01 RP AUTOMATION INC 11JAN89
DESCRIPTION
The programs in this file allow changes to be made to files on
a floppy diskette.
The file to be changed could be either an ASCII file (regular
VAL file containing .PROGRAM's, .LOCATIONS, and .REALS), or a
binary file (CALIBRATION OVERLAY, POTCAL, or diagnostic file).
PREPARATION
Load the CHANGE.FILE file into memory.
PROGRAM EXECUTION
After the "change.file" program has been executed, the normal
steps that this program follows are:
1. Wait for correct diskette to be in disk drive
before continuing. Press <ENTER> when diskette
is ready.
2. Ask for the name of the file to be changed. If
no name is entered, then the program ends.
3. Ask whether this is an ASCII file, or a BINARY
file. All files that get LOAD'd into a VAL-II
system are ASCII files. Any files that need
a different method (OVE or DIAG) are BINARY
files.
4. Ask for name of the file to be created. This
file will contain all of the changes. Again,
it is possible to EXIT the program by entering
a NULL name (just press the <ENTER> key).
5. The two files are then opened on the diskette
and reading and writing commences.
6. Each block of data that is read from the first
file is displayed on the CRT screen (256 bytes
per block). The option is given to make any
changes to that block of data. The new data is
then written out to the diskette as a block of
data for the new file. This process continues
until the entire file has been read, modified,
and written.
PROGRAM EXECUTION (continued)
7. When the file is finished, the program PROMPTs
for another filename to be changed. This will
continue until all files to be changed have
been done. The program will EXIT when no name
is given as the response to the filename query.
NOTES
Because of the way that the data is read from the diskette (in
blocks of 256 bytes), it is likely that parts of one line will
be in one block, while the rest of that line will be in the
next block.
When changing the data, make sure that the address is an even
octal number. Also, make sure that both bytes are entered as
the data that is to be changed. This is because everything in
this system works on 16-bit values and this data is only 8-bit
values.
MESSAGES
*** Floppy error nn ***
If a floppy error occurs during the program, then this message
will get displayed, where 'nn' is a number which corresponds to
the internal floppy disk drive error code. The codes are:
2 = File already exists (creating new file with same name)
3 = File does not exist (opening file for reading)
4 = Communications error between VAL & floppy
5 = Disk full (writing to disk)
6 = Communications error between VAL & floppy
7 = Communications error between VAL & floppy
10 = Communications error between VAL & floppy
11 = Communications error between VAL & floppy
12 = Floppy not ready
13 = Floppy read error (diskette may be bad)
14 = Communications error between VAL & floppy
41 = No STX received during block transfer
42 = Incorrect checksum received during block transfer
*** ILLEGAL ADDRESS ***
If an incorrect value is entered for the address to change data
at, then this message will get displayed.
*** ILLEGAL 16-bit octal number ***
If an incorrect value is entered for an octal number, then this
message will get displayed.
*** All Done ***
When program has finished this message gets displayed.