mkusamy Beginner

Joined: 07 Nov 2008 Posts: 9 Topics: 6
|
Posted: Tue Oct 27, 2009 9:44 am Post subject: Addressability issues for literals when using YREGS |
|
|
When YREGS macro is used to equate Register numbers before the first CSECT, addressability issues are coming for literals.
Test listings when using YREGS before the CSECT
Code: | Active Usings: None
Loc Object Code Addr1 Addr2 Stmt Source Statement
1 PRINT NOGEN
2 YREGS
000008 00008 00068 21 YREGS1 CSECT
000008 90EC D00C 0000C 23 STM R14,R12,12(R13)
00000C 0DC0 24 BASR R12,0
R:C 0000E 25 USING *,R12
00000E 50D0 C01E 0002C 26 ST R13,VSAVAREA+4
000012 41D0 C01A 00028 27 LA R13,VSAVAREA
000016 0000 0000 00000 29 L R2,=F'123'
** ASMA307E No active USING for operand =F'123'
** ASMA435I Record 11 in ABC.XYZ.JOB00120.D0000101.? on volume:
00001A 58D0 D004 00004 31 L R13,4(,R13)
00001E 98EC D00C 0000C 32 LM R14,R12,12(R13)
000022 1BFF 33 SR R15,R15
000024 07FE 34 BR R14
000026 0000
000028 0000000000000000 36 VSAVAREA DC 18A(0)
000008 38 END YREGS1
000000 0000007B 39 =F'123' |
In the above listing
1. Addressability issues have come for literal =F'123.
2. CSECT starts at loc 08. Why not starts at location 00?
3. Literal F'123' starts at location 00.
But this is not the case, when YREGS is used inside the CSECT.
Code: | Active Usings: None
Loc Object Code Addr1 Addr2 Stmt Source Statement
000000 00000 0006C 1 YREGS1 CSECT
2 PRINT NOGEN
3 YREGS
000000 90EC D00C 0000C 23 STM R14,R12,12(R13)
000004 0DC0 24 BASR R12,0
R:C 00006 25 USING *,R12
000006 50D0 C01E 00024 26 ST R13,VSAVAREA+4
00000A 41D0 C01A 00020 27 LA R13,VSAVAREA
00000E 5820 C062 00068 29 L R2,=F'123'
000012 58D0 D004 00004 31 L R13,4(,R13)
000016 98EC D00C 0000C 32 LM R14,R12,12(R13)
00001A 1BFF 33 SR R15,R15
00001C 07FE 34 BR R14
00001E 0000
000020 0000000000000000 36 VSAVAREA DC 18A(0)
000000 38 END YREGS1
000068 0000007B 39 =F'123' |
Of course, we can simply use YREGS inside the CSECT to fix this, but I would like to know the reasons behind this.
Can any one please clarify this? Thanks in advance!! |
|