Example: Program initialization code
A listing of the program initialization code gives you information about the characteristics of the COBOL source program. Interpret the program signature information bytes to verify characteristics of your program.
The information such as PROGRAM-ID, COMPILED
TIME, and COMPILED DATE included in the initialization code of Enterprise
COBOL V4 or earlier is not included in the initialization code of
Enterprise COBOL V5 or later, so the program it depends on might behave
differently with Enterprise COBOL V5 and V6. For more details,
see Error behavior changes for incorrect
programs (Enterprise COBOL Migration Guide)
(1) (2) (3) (4) (5)
000000 000003 PROC IGYTCARA
000000 47F0 F014 000003 BC R15,20(,R15) # Skip over constant area
000004 01C3 C5C5 000003 DC X'01C3C5C5' # Eyecatcher: CEE
000008 0000 0978 000003 DC X'00000978' # Stack Size
00000C 0000 8910 000003 DC X'00008910' # Offset to PPA1
000010 47F0 F001 000003 BC R15,1(,R15) # Wrong Entry Point: cause exception
000014 000003 L3282: EQU *
000014 90EC D00C 000003 STM R14,R12,12(,R13) # Save GPRs Used
000018 4110 F024 000003 LA R1,36(,R15) # Args for boot strap routine
00001C 98EF F034 000003 LM R14,R15,52(,R15) #
000020 07FF 000003 BR R15 # Branch to boot strap routine
000022 0000 000003 DC X'0000' # Available half-word
000024 000003 L3284: EQU * # Boot Strap Info Block
000024 0000 0000 000003 DC X'00000000' # address of entry label
000028 0000 0000 000003 DC X'00000000' # WSA24 allocation size
00002C 0000 8A0C 000003 DC X'00008A0C' # address of Saved Option String
000030 0000 8948 000003 DC X'00008948' # address of entry point name
000034 0000 0054 000003 DC X'00000054' # A(Label L3283)
000038 0000 0000 000003 DC X'00000000' # address of boot strap routine(IGZXBST)
00003C 000003 L3285: EQU * # CEE Parameter Block
00003C 0000 0024 000003 DC X'00000024' # address of infoBlockLabel
000040 0000 8A1C 000003 DC X'00008A1C' # A(PARMCEE-CEEEPARMBlock)
000044 000003 L3280: EQU * # Handle growing stack
000044 58F0 C31C 000003 L R15,796(,R12) # Load CEECAAOGETS
000048 184E 000003 LR R4,R14 # Required NAB
00004A 05EF 000003 BALR R14,R15 # Extend Stack
00004C 0000 0000 000003 DC X'00000000' # Argument list size = 0
000050 A7F4 0009 000003 J L3281 # Branch back
000054 000003 @MAINENT DS 0H # PRIMARY ENTRY POINT ADDRESS
000054 000003 L3283: EQU * # User Code Entry Point
000054 18EF 000003 LR R14,R15 # Load NAB
000056 4100 E978 000003 LA R0,2424(,R14) # New NAB Address
00005A 5500 C314 000003 CL R0,788(,R12) # Exceed current storage segment?
00005E A724 FFF3 000003 JH L3280 # Yes: branch to recovery code
000062 000003 L3281: EQU * # Stack now has sufficient room
000062 5000 E04C 000003 ST R0,76(,R14) # Update NAB
000066 A708 0010 000003 LHI R0,16 # COBOL Language Word upper half
00006A 8900 0010 000003 SLL R0,16 # shift to upper half of register
00006E A70A 0301 000003 AHI R0,769 # add COBOL Language Word lower half
000072 5000 E000 000003 ST R0,0(,R14) # Save Language Word
000076 50D0 E004 000003 ST R13,4(,R14) # Save Back Chain
00007A 18DE 000003 LR R13,R14 # Set new DSA
00007C 4100 D6D0 000003 LA R0,1744(,R13) # Address of COBDSACB
000080 5000 D074 000003 ST R0,116(,R13) # Saved in member slot1
000084 4100 0000 000003 LA R0,0(,R0) #
000088 5000 D070 000003 ST R0,112(,R13) # zero member slot0
- (1)
- Offset from the start of the COBOL program
- (2)
- Hexadecimal representation of assembler instructions
- (3)
- Source line number
- (4)
- Pseudo-assembler representation of the code generated for the COBOL program
- (5)
- Comments that explain the pseudo-assembler code