Ah! You said location counter. You meant offset. (Not criticizing; it's just that I took you literally.)
You want to know why are the first 3 s-cons 8xxx and the remainder Dxxx? ** ASMA303W Multiple address resolutions may result is a hint. You got a whole lotta USINGs there. LKINFO(X'FFFFE56C'),R13+X'2A94' provides a clue. The base register changes right at 2A94 into your CSECT. That is where you told HLASM that R13 points, and HLASM always (?) chooses the smallest offset when it has multiple choices. Charles -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of João Reginato Sent: Sunday, April 3, 2022 12:50 PM To: [email protected] Subject: Re: Weird location counter It was using R8 as the base register +displacement and suddenly changes to R13 as you can see in 8A92D000, ie. R8+x'A92' and then R13(RD)+x'000' Em dom., 3 de abr. de 2022 16:42, Charles Mills <[email protected]> escreveu: > 002A8E 5341+PATCH_AREA DS 0H PATCH AREA > 002A8E 8A8E8A908A92D000 5342+ DC 64S(*) PATCH AREA > 002A96 D002D004D006D008 ==> THE LOCATION COUNTER WAS CHANGED SUDDENLY > !!!!!!!! > 002A9E D00AD00CD00ED010 > > The location counter changed by 8, no? 8 bytes of S constants? > > Charles > > > -----Original Message----- > From: IBM Mainframe Assembler List [mailto:[email protected] > ] > On Behalf Of João Reginato > Sent: Sunday, April 3, 2022 12:02 PM > To: [email protected] > Subject: Weird location counter > > Hi guys > Take a look in these pieces of code compiled in z/OS V2R4: (use any > proportional font like courier for better understanding) > > 000BCC D2A5 D100 8B94 00100 02B94 2107 MVC > WKINFO(LINFO/2),LKINFO INITIALIZE DYNALLOC > 000BD2 D2A5 D1A6 8C3A 001A6 02C3A 2108 MVC > WKINFO+(LINFO/2)(LINFO/2),LKINFO+(LINFO/2) > D 100 02B94 00100 2109 USING LKINFO,WKINFO > ** ASMA303W Multiple address resolutions may result from this USING and the > USING on statement number 781 > 000BD8 4100 D104 02B98 2110 LA R0,LKINFO+4 > RB POINTER > 000BDC 5000 D100 02B94 2111 ST R0,LKINFO > SAVE IT > 000BE0 9680 D100 02B94 2112 OI LKINFO,X'80' > LAST RB > 000BE4 4100 D118 02BAC 2113 LA R0,LKTXTIFC > 1ST TEXT UNIT > 000BE8 5000 D10C 02BA0 2114 ST R0,LKATXTU > SAVE IT > 000BEC 4100 D128 02BBC 2115 LA R0,LKDDNP > USE THIS DDNAME > 000BF0 5000 D118 02BAC 2116 ST R0,LKTXTIFC > SAVE IT > 000BF4 4100 D13A 02BCE 2117 LA R0,LKDSGP > RETURN DSORG > 000BF8 5000 D11C 02BB0 2118 ST R0,LKTXTIFC+4 > SAVE IT > 000BFC 4100 D146 02BDA 2119 LA R0,LKDSNP > RETURN DSNAME > 000C00 5000 D120 02BB4 2120 ST R0,LKTXTIFC+8 > SAVE IT > 000C04 9680 D120 02BB4 2121 OI LKTXTIFC+8,X'80' > LAST TEXT UNIT > ... > 000C20 4110 D100 02B94 2129 S3DYNIOK LA R1,LKINFO > POINTS TO PARAMETERS > 2130 DYNALLOC , > RETURN DSORG & TRUE DSNAME > 2131+* MACDATE Y-2 73082 > 000C24 0A63 2132+ SVC 99 CALL DYNAMIC > ALLOCATION > ... > Up to here everything appears to be ok. But see below: > ... > 0017FA E3F0 D07C 0058 02B10 3486+ LY R15,=V(FDRCOMPR) > LOAD EPA > ... > 002A8E 5341+PATCH_AREA DS 0H > PATCH AREA > 002A8E 8A8E8A908A92D000 5342+ DC 64S(*) > PATCH AREA > 002A96 D002D004D006D008 ==> THE LOCATION COUNTER WAS CHANGED SUDDENLY > !!!!!!!! > 002A9E D00AD00CD00ED010 > 002AA6 D012D014D016D018 > 002AAE D01AD01CD01ED020 > 002AB6 D022D024D026D028 > 002ABE D02AD02CD02ED030 > 002AC6 D032D034D036D038 > 002ACE D03AD03CD03ED040 > 002AD6 D042D044D046D048 > 002ADE D04AD04CD04ED050 > 002AE6 D052D054D056D058 > 002AEE D05AD05CD05ED060 > 002AF6 D062D064D066D068 > 002AFE D06AD06CD06ED070 > 002B06 D072D074D076D078 > 002B10 5343+ LTORG > 002B10 00000000 5344 =V(FDRCOMPR) > 002B14 00000000 5345 =V(FDRDCOMP) > ... > Page 83 > Active Usings: TLTCVAF,R2 IHADCB,R3 TASKPARM,R10 FDRIOC,R11,R9,R8 > QCTDCB,R12 JFCB(X'FB4'),R12+X'4C' > DECB(X'FF0'),R12+X'10' WKAREA,R13 LKINFO(X'FFFFE56C'),R13+X'2A94' > DCBE,R15 > Loc Object Code Addr1 Addr2 Stmt Source Statement > HLASM R6.0 2022/04/01 19.40 > ... > 002B94 80002B98 29585 LKINFO DC A(*+X'80000004') > RB POINTER > 002B98 1407 29586 DC > AL1(LKTXTIFC-*,S99VRBIN) LENGTH, INFORMATION VERB > 002B9A 0600 29587 DC > AL1(S99MSGL0+S99GDGNT,0) FLAGS1 > 002B9C 0000 29588 LKERC DC AL2(0) > ERROR CODE > 002B9E 0000 29589 LKIRC DC AL2(0) > INFO CODE > 002BA0 00002BAC00000000 29590 LKATXTU DC A(LKTXTIFC,0) > TEXT UNIT LIST PTR, RBX > 002BA8 00000000 29591 DC AL1(0,0,0,0) > FLAGS2 > 002BAC 00002BBC00002BCE 29592 LKTXTIFC DC > A(LKDDNP,LKDSGP,LKDSNP+X'80000000') > 002BB4 80002BDA > 002BB8 C4C4D5D4 29593 DC C'DDNM' > 002BBC 000100010008 29594 LKDDNP DC AL2(DINDDNAM,1,8) > GET INFO FROM > 002BC2 4040404040404040 29595 LKDDN DC CL8' ' > DDNAME > 002BCA C4E2D6D9 29596 DC C'DSOR' > 002BCE 000A00010002 29597 LKDSGP DC AL2(DINRTORG,1,2) > GET INFO FROM > 002BD4 0000 29598 LKDSG DC AL2(0) > DSORG > 002BD6 C4E2D5D4 29599 DC C'DSNM' > 002BDA 0005000100FF 29600 LKDSNP DC > AL2(DINRTDSN,1,L'TKPATHN) GET INFO FROM > 002BE0 0000000000000000 29601 LKDSN DC XL(L'TKPATHN)'00' > DSNAME/PATH > 002CE0 29602 DS 0H > 0014C 29603 LINFO EQU *-LKINFO > LENGTH > 29604 > *--------------------------------------------- > 29605 *- DYNAMIC AREA > 29606 > *--------------------------------------------- > 000000 00000 0024C 29607 WKAREA DSECT > ... > 000100 29662 DS 0F > 000100 29663 WKINFO DS CL(LINFO) > ... > END > > Take a look at the location counter following “PATCH_AREA” label and the > USING list in the header lines above. > This is a very large source program with 3 base registers: (R11, R9 and > R8). > > My questions are: > 1. Why “LKINFO(X'FFFFE56C'),R13+X'2A94'” does show a negative > location? > 2. About “0017FA E3F0 D07C 0058 02B10 3486+ LY > R15,=V(FDRCOMPR)”: > That should be “0017FA E3F0 8B10 0058”. Am I right? > 3. Also the patch area is wrong. Why? > 4. Where am I going wrong? > > Any tips will be helpful. > > TIA > João >
