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

Making Changes, Making Copies of Programs, Renaming a Program, Creating a Startup Program

Page 41 highlights

Chapter 2 - Understanding Fingerprint Syntax Making Changes If you LOAD a program, make changes, and then SAVE the program under the original name and in the original directory, the original program will be replaced. The next example changes the value of a variable in line 50, and replaces the original version with the new version: LOAD "PROGRAM1.PRG" 50 A%=300 SAVE "PROGRAM1.PRG" Making Copies of Programs The easiest way to copy a program is to use a COPY statement. Optionally, you can include directory references in the statement. The next example copies a program from the permanent memory to a memory card, and gives the copy a new name: COPY "/c/FILELIST.PRG","card1:COPYTEST.PRG" If you LOAD a program and then SAVE it under a new name or in another directory, you will create a copy of the original program. The next example creates a copy of the program LABEL1.PRG and gives the copy the name LABEL2.PRG: LOAD "LABEL1.PRG" SAVE "LABEL2.PRG" Renaming a Program To rename a program (or any other file), LOAD it, SAVE it under a new name, and finally KILL the original program. Example (renames LABEL1.PRG with the name LABEL2.PRG): LOAD "LABEL1.PRG" SAVE "LABEL2.PRG" KILL "LABEL1.PRG" Creating a Startup Program The MKAUTO.PRG program is used to create autoexec.bat-files, which are programs that are loaded and run automatically as soon as the power is switched on and the printer is initialized. Usually, a startup program contains some kind of loop which makes it run infinitely, awaiting some input or action from the operator. There can be one startup file stored in each of three main parts of the printers memory. If there are more startup files, only one will be selected based on the following priority: 1 An AUTOEXEC.BAT file stored in a CompactFlash memory card, provided the card was inserted in the printer before startup. 2 An AUTOEXEC.BAT file stored in the read/write part of the printer permanent memory (device "/c"). Fingerprint Developer's Guide 29

  • 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 2 — Understanding Fingerprint Syntax
Fingerprint Developer’s Guide
29
Making Changes
If you LOAD a program, make changes, and then SAVE the program under the
original name and in the original directory, the original program will be replaced.
The next example changes the value of a variable in line 50, and replaces the original
version with the new version:
LOAD “PROGRAM1.PRG”
50 A%=300
SAVE “PROGRAM1.PRG”
Making Copies of Programs
The easiest way to copy a program is to use a COPY statement. Optionally, you can
include directory references in the statement.
The next example copies a program from the permanent memory to a memory card,
and gives the copy a new name:
COPY “/c/FILELIST.PRG”,“card1:COPYTEST.PRG”
If you LOAD a program and then SAVE it under a new name or in another directory,
you will create a copy of the original program.
The next example creates a copy of the program LABEL1.PRG and gives the copy the
name LABEL2.PRG:
LOAD “LABEL1.PRG”
SAVE “LABEL2.PRG”
Renaming a Program
To rename a program (or any other file), LOAD it, SAVE it under a new name, and
finally KILL the original program.
Example (renames LABEL1.PRG with the name LABEL2.PRG):
LOAD “LABEL1.PRG”
SAVE “LABEL2.PRG”
KILL “LABEL1.PRG”
Creating a Startup Program
The MKAUTO.PRG program is used to create autoexec.bat-files, which are
programs that are loaded and run automatically as soon as the power is switched on
and the printer is initialized. Usually, a startup program contains some kind of loop
which makes it run infinitely, awaiting some input or action from the operator.
There can be one startup file stored in each of three main parts of the printers
memory. If there are more startup files, only one will be selected based on the
following priority:
1
An AUTOEXEC.BAT file stored in a CompactFlash memory card, provided the
card was inserted in the printer before startup.
2
An AUTOEXEC.BAT file stored in the read/write part of the printer permanent
memory (device “/c”).