Ludzie pragną czasami się rozstawać, żeby móc tęsknić, czekać i cieszyć się z powrotem.
11
Example of program code to be corrected.
The assembler line we are going to change is the one with address H'7DE.
At that address, the data register 0 is loaded with the contents of the variable number 20. Suppose now that we want another variable to be loaded into that register and used as the basis for the jump instruction at H’7DF.
The correction will be written with command PCORL. In this example, the instruction on address H'7DE is to be replaced. In this case, the parameter
“IS” (=Instruction Substitute) must be used (Figure 3.12). The parameter IS indicates the start and stop addresses of the sequence of instructions to be replaced (here, only one instruction is to be replaced). If instructions are to be added to the existing program, parameter “IA” (=Instruction Add) has to be used. For further details, please see the command description for command PCORL.
<PCORL:BLOCK=MMM,IS=H’7DE,CI=TEST1;
PCORL:BLOCK=MMM,IS=H’7DE,CI=TEST1;
<;
WRITE PROGRAM CODE
:RS DR0-12;
:END;
EXECUTED
Figure 3.12
Loading of a correction in the correction area.
Our correction is now loaded in the correction area of block MMM. However, it is still in state PASSIVE. The printout with command PCODP
shows what it looks like when the correction is loaded (Figure 3.13) 64
Correction Handling
As can be seen from the printout, the new instruction is written on the right hand side of the printout. This part is used to show the passive code. The state can also be seen under the heading “S” (S for state). The P in the printout stands for PASSIVE.
<PCODP:BLOCK=MMM,IS=H’7DE-H’7E6;
PROGRAM CODE
ADDR
S
ACTIVE
CODE
ADDR
S
PASSIVE
CODE
H’07DE
RSA
DR0-20;
H’07DE
P
XJCA
H’13;
H’23CC
P
RSU
DR0-12;
H’23CE
P
JLN
H’07DF;
H’07DF
JEC
DR0,0,H’07E8;
H’07E1
MFR
AR0-DR0;
H’07E2
SCC
AR0-1;
H’07E3
WOU
75;
H’07E4
RSA
DR0-60;
H’07E5
MFR
PR0-AR0;
H’07E6
SSIB
DR0,CLSCAN0,0,1;
SSIB
DR0,H’02E,0,1;
END
Figure 3.13
Printout of the program code with the passive correction loaded.
The next action is to activate the correction. This is made with the command PCORI. The parameters are the block name and the identification address of the correction (start address). Figure 3.14 also shows the printout after activation. The command PCODP can be used to print a correction only. The parameter “IS” is in this case set to the same address as the correction.
65
Program Corrections and ASA
<PCORI:BLOCK=MMM,IA=H’7DE;
PCORI:BLOCK=MMM,IA=H’7DE;
<;
EXECUTED
<PCODP:BLOCK=MMM,IS=H’7DE;
PROGRAM CODE
ADDR
S
ACTIVE
CODE
ADDR
S
PASSIVE
CODE
H’07DE
A
XJCA
H’13;
H’07DE
RSA
DR0-20;
H’23CC
A
RSU
DR0-12;
H’23CE
A
JLN
H’07DF;
END
Figure 3.14
Activation and printout of the active correction.
As can be seen, the correction is now on the left side of the printout and under the column “ACTIVE CODE”. On address H'7DE the instruction XJCA is inserted. The instruction is used to jump to the correction area (the instruction name is “eXecute Jump to Correction Area”). Next the new RSU instruction is written at address H'23CC in the correction area.
The correction is concluded with a return jump to address H'7DF, the address after the corrected instruction.
The correction should now be tested. The test is a test of the corrected function. If the correction is faulty and the system generates a restart, the correction is automatically deactivated.
The correction is confirmed with the command PCORS.
<PCORS:BLOCK=MMM,IA=H’7DE;
PCORS:BLOCK=MMM,IA=H’7DE;
<;
EXECUTED
<PCODP:BLOCK=MMM,IS=H’7DE;
PROGRAM CODE
ADDR
S
ACTIVE
CODE
ADDR
S
PASSIVE
CODE
H’07DE
C
XJCA
H’13;
H’07DE
RSA
DR0-20;
H’23CC
C
RSU
DR0-12;
H’23CE
C
JLN
H’07DF;
END
Figure 3.15
Confirmation and printout of the confirmed correction.
66
Correction Handling
The column “S” has now changed to a C. The C stands for confirmed. This means that the correction remains active even after a system restart.
Finally, the two commands to remove a correction are shown.
<PCORE:BLOCK=MMM,IA=H’7DE;
PCORE:BLOCK=MMM,IA=H’7DE;
<;
EXECUTED
<PCORR:BLOCK=MMM,IA=H’7DE;
PCORR:BLOCK=MMM,IA=H’7DE;
<;
EXECUTED
Figure 3.16
Deactivation and Removal of a correction.
Corrections in the Signal Distribution Table
The system is also capable of handling corrections in the Signal Distribution Table. The command used for this is PCSDL. The command writes the new address in the SDT and stores both the old and the new addresses in the correction area. This enables the operator to switch back to the old address. The SDT can be printed with the command PCSDP.
A correction in the SDT is activated, confirmed, deactivated and removed with the same commands, PCORI and PCORS, as for the corrections in the program code.
Corrections in the SDT are required if
• program execution starts at the wrong IA for a certain signal
• a new incoming signal for a new program sequence in a block is inserted
Figure 3.17 shows how a correction in the Signal Distribution Table is made.
67
Program Corrections and ASA
PS
n
Signal Distribution Table
.
.
.
INSIG
New address
i..
2
1
Signal Sending Table
Program
Label
Correction
Old address
Area
New address
Figure 3.17
A correction in the Signal Distribution Table.
An Example of a Correction in the SDT