Intermec PC43d Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43, PM4 - Page 48

Commands for Transferring Files Between Printers, Checking Transferred Files With CHECKSUM

Page 48 highlights

Chapter 3 - Managing Files Element 2 returns: ASCII value of last character Element 3 returns: Last error Element 4 returns: Block check type used 2-element string array (requires no DIM stmt) Element 0 returns: Type of protocol: "KERMIT" or "ZMODEM" Element 1 returns: Last file name received Example: 10 TRANSFER KERMIT "R" 20 DIM A%(4) 30 TRANSFER STATUS A%,B$ 40 PRINT A%(0), A%(1), A%(2), A%(3), A%(4) 50 PRINT B$(0), B$(1) RUN Commands for Transferring Files Between Printers If you want to transfer a file from one printer to another printer, start by transferring the file to the host. Then disconnect the first printer and download the file to the second printer (or have the two printers connected to separate serial ports). After the transfer, check if the transfer was successful by comparing the result of CHECKSUM functions on both printers. Checking Transferred Files With CHECKSUM Calculate the CHECKSUM on the program in the transmitting printer before the transfer. After the transfer is completed, LOAD the program in the receiving printer and perform the same calculation. If the checksums are identical, the transfer was successful. Note: Do not confuse CHECKSUM with CSUM. For more information, see "Commands for Working With Arrays" on page 36. In this example, the checksum in the lines 10 to 90,000 of a program is calculated: "DEMO.PRG." LOAD "DEMO.PRG" PRINT CHECKSUM (10,90000) Commands for Working With Arrays Variables containing related data may be organized in arrays. Each value in an array is called an element. The position of each element is specified by a subscript, one for each dimension (maximum 10.) Each array variable consists of a name and a number of subscripts, separated by commas, and enclosed by parentheses, as in this example: ARRAY$(3,3,3) 36 Fingerprint Developer's Guide

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163

Chapter 3 — Managing Files
36
Fingerprint Developer’s Guide
Element 2 returns: ASCII value of last character
Element 3 returns: Last error
Element 4 returns: Block check type used
2-element string array (requires no DIM stmt)
Element 0 returns: Type of protocol: “KERMIT” or “ZMODEM”
Element 1 returns: Last file name received
Example:
10 TRANSFER KERMIT “R”
20 DIM A%(4)
30 TRANSFER STATUS A%,B$
40 PRINT A%(0), A%(1), A%(2), A%(3), A%(4)
50 PRINT B$(0), B$(1)
RUN
Commands for Transferring Files Between Printers
If you want to transfer a file from one printer to another printer, start by
transferring the file to the host. Then disconnect the first printer and download the
file to the second printer (or have the two printers connected to separate serial
ports). After the transfer, check if the transfer was successful by comparing the
result of CHECKSUM functions on both printers.
Checking Transferred Files With CHECKSUM
Calculate the CHECKSUM on the program in the transmitting printer before the
transfer. After the transfer is completed, LOAD the program in the receiving printer
and perform the same calculation. If the checksums are identical, the transfer was
successful.
In this example, the checksum in the lines 10 to 90,000 of a program is calculated:
“DEMO.PRG.”
LOAD “DEMO.PRG”
PRINT CHECKSUM (10,90000)
Commands for Working With Arrays
Variables containing related data may be organized in arrays. Each value in an array
is called an element. The position of each element is specified by a subscript, one for
each dimension (maximum 10.) Each array variable consists of a name and a
number of subscripts, separated by commas, and enclosed by parentheses, as in this
example:
ARRAY$(3,3,3)
Note:
Do not confuse CHECKSUM with CSUM. For more information, see
“Commands for Working With Arrays” on page 36
.