3 shows the command how to check the correction area of block MMM.
Note: This command together with all following commands in this chapter can be used for both APZ 211 and APZ 212. The structure of the printout will differ slightly between the different control systems. All printouts in this chapter were made on an APZ 212.
54
Correction Handling
<PCORP:BLOCK=MMM;
PROGRAM CORRECTIONS
BLOCK
SUID
CA
CAF
MMM
4942/CAA 107 8829/M52C R1A07
64
44
CI
S
TYPE
POSITION
SIZE
JNABI1676
C
CODE
H’1603
23
JNABI1676
C
CODE
H’164B
24
BB46521
C
CODE
H’00E8
16
ETX5
C
SDT
PER
10
ETX5
C
SST
74
11
F
44
Figure 3.3
Printout of a Correction Area with 3 corrections.
The area consists of 128 words, 44 words are free (CAF). A new correction will therefore cause an increase in size of the Correction Area. The individual corrections are listed with their Correction Identity (CI), the state of the correction (S), the correction type, the position - IA in case of a correction in ASA-code, SSP in case of a SST-correction and Signal in case of a SDT-correction - and the individual size in number of words.
More information on this is found in the next chapters.
The Layout of a Correction in the Correction Area Corrections are stored in a standardized way. A correction is divided into two parts: the Correction Label, and the type specific information part.
Figure 3.4 shows the structure of the Correction Label, common for all types of corrections.
A short description of the information stored in the Correction Label follows below:
SIZE
Size of the correction record in 16 bit words. If SIZE=0, the record com-prises the remainder of the allocated correction area. The state of a record with SIZE=0 is always free. If SIZE=1, the state of the correction record is always free. For all other sizes, the state of the correction record is determined by the STATE-field in the label, see below.
A
Indicates whether the correction is absolute allocated or not. A=0 means the correction is relocatable. A=1 means the correction is absolute allocated. This information is not used at present.
55
Program Corrections and ASA
PS
15
11
7
3
0
CPTR
SIZE
A
STATE
TYPE
SPARE
length
CI
Figure 3.4
Correction label layout.
STATE
Different states of a correction enables the system to handle the corrections in a secure way in case of System Restarts. See explanation in chapter “States of a Correction”.
TYPE
The type of correction allocated in the correction record. The field can take the following values:
0 - No type, the correction record is idle.
1 - SDT, Signal Distribution Table correction.
2 - SST, Signal Sending Table correction.
3 - Code, program code correction.
SPARE
An extra word, added for future use.
CI
The Correction Identity, stored as a string, using as few words as possible (indicated as length). The command used for loading a correction allows a maximum of 15 characters.
Program Code Correction
The structure of the information part of a correction, which is unique for each type of correction, is shown in Figure 3.5.
56
Correction Handling
PS
CPTR
15
0
Correction
Label
IA
RETURN
Old instruction
New instruction
SPARE
WASTE AREA
Correction
Code
.
.
.
Figure 3.5
Program Code Correction layout.
IA
Instruction Address. The address (relative to PSA) where the program code correction is made.
RETURN
The Return address (relative to PSA) to the program code area. This address indicates where to continue after the correction has been executed.
Old Ins
Old Instruction. Contents at address IA in the program code area, to be replaced at activation of the correction. This enables the system to switch back to the old code at any time.
New Ins
New Instruction. When a correction is loaded, the system inserts a jump instruction to the correction area in the program code. New Ins is the binary code for this ‘jump to correction area instruction’ (XJCA). The jump instruction is inserted where the correction should be effective in the code at activation of the correction.
57
Program Corrections and ASA
SPARE
An extra word, added for future use.
WASTE AREA
Due to the modularity of the jump to correction area instruction, the correction code must start at a modulo-4 address. This means that there will be a gap of 0-3 unused words between the spare field and the correction code section.
Correction Code
The correction code section contains the executable binary code corresponding to the instructions entered by the operator. The system always inserts an unconditional jump to the program code area return address as the last instruction in the correction code section.
Printout of Code from the CP
The block PCT contains an assembler and a disassembler. These functions enable the operator to print any code in any block in the system. The command used is PCODP and the parameters needed are the block name and the start and stop addresses. The code is presented as an assembler code with relative addresses within the block.
Differences Between the ASA-Document and the PCODP-Printout
When the code is printed with the command PCODP, the format is not exactly the same as the format in the ASA-document. The main differences in the code compared to the ASA-document for an APZ 212 can be seen below:
Implemented ASA
ASA Code
Code
the labels are replaced
JLN %L%6070;
JLN H’0A8F;
by addresses
variable names are
WS CCREF-DR3;
WSA 22-DR3;
replaced by numbers
the signal sending
SSB DISCONN MS;
SSB 4, 3, 1;
statements differ
Stating the Start Address
When printing the code of a block, it is very important that the start address is stated correctly. In the command PCODP, the start and the stop addresses are stated. A faulty start address can give a faulty printout or lead to a fault code. Figure 3.6 gives an example of a printout.
58
Correction Handling
<PCODP:BLOCK=MMM,IS=H’7D8-H’7E6;
PROGRAM CODE
ADDR
S
ACTIVE
CODE
ADDR
S
PASSIVE
CODE
H’07D8
RSU
DR0-75;
H’07DA
JUC
|