beautypg.com

Functions, List file generating function, 5 functions 4.5.1 list file generating function – Casio Cassiopeia PA-2400 User Manual

Page 47

background image

47

4.5 Functions

4.5.1 List File Generating Function

If the names of files to be transferred (copied) from the H/PC are specified, this function will

create a list of files to be transferred (copied) and a list file that contains the checksum data

calculated from all the files to be transferred. Furthermore, the checksum data of this list file is

also generated.The name of a list file created with this function is set to "FCHK.LOG".

If the list file is successfully created, a "0" return value will be passed to this function as the
program termination code. If list file creation fails, this function receives a return value that is

not "0" and is abnormally terminated. In either case a history file is generated.

(FCHKG.HIS is created in [FCHK.LOG File output Directory name]).

The history file is generated to track the process of creating a list file. The user must transmit

(copy) the list file generated by this function to the partner station (child machine side) when

performing any file transfer (file copy).

Information to be set in the list file includes:

1) File size

2) Date and time of update

3) Transfer (copy) destination pathname (file name)

4) Number of transferred (copied) files

5) Checksum data of all the transferred (copied) files

6) Checksum data of list file

The checksum data of all the transferred (copied) files consists of the result in which each piece

of double-word data in all the objective files is XORed sequentially from beginning to end.

However, the checksum data of a list file is generated to obtain the sum of each double-word

contained in the list file, then a value is calculated that offsets the sum to zero. Use this offset

value as the checksum data.

The checksum data will be outputted as a list file as follows:

FILE_CHECKSUM=HHHHLLLL ( HHHH: HIGH-WORD / LLLL: LOW-WORD )

LIST_CHECKSUM=HHHHLLLL ( HHHH: HIGH-WORD / LLLL: LOW-WORD )

If an error occurs while generating the checksum of the list file (FCHK.LOG) which has

already been generated, the list file will be aborted. However, a generated list file will not be

deleted even if an error occurs during the analysis of command parameters.