As noted before, this is the Z390 assembler.  

As you can see from the assembler listing, and verify from the OBJ dump,
X'00000004' is assembled in the object program for all constants.

I am a little surprised by the SIGN=+ in the RLD listing.

The OS/360 and successor assemblers are the only ones that I know of that
allow for relocation factors of -1 or 2, and I am not sure that the assembler
is doing that right.  (And V constants probably shouldn't do it, either.)

10:44:00 extrn     MZ390 START USING z390 V1.5.06 ON J2SE 1.8.0_60 08/26/15
AZ390I Copyright 2011 Automated Software Tools Corporation
AZ390I z390 is licensed under GNU General Public License
AZ390I program = C:\Users\c-glenh\z390\extrn
AZ390I options = sysmac(C:\PROGRA~2\AUTOMA~1\z390\mac+.)
  syscpy(C:\PROGRA~2\AUTOMA~1\z390\mac+.)
External Symbol Definitions
 ESD=0001 LOC=00000000 LEN=00000018 TYPE=CST NAME=XXX
 ESD=0002 LOC=00000000 LEN=00000000 TYPE=EXT NAME=YYY
 ESD=0003 LOC=00000000 LEN=00000000 TYPE=EXT NAME=ZZZ
Assembler Listing
000000                                        (1/1)1 *  test V constants
000000                                        (1/2)2 XXX  CSECT
000000                                        (1/3)3      EXTRN  YYY
000000 00000004                               (1/4)4      DC     V(ZZZ+4)
000004 00000004                               (1/5)5      DC     A(YYY+4)
000008 00000004                               (1/6)6      DC     V(-ZZZ+4)
00000C 00000004                               (1/7)7      DC     A(-YYY+4)
000010 00000004                               (1/8)8      DC     V(ZZZ+ZZZ+4)
000014 00000004                               (1/9)9      DC     A(YYY+YYY+4)
000018                                      (1/10)10      END
Relocation Definitions
 ESD=0001 LOC=00000000 LEN=4 SIGN=+ XESD=0003
 ESD=0001 LOC=00000004 LEN=4 SIGN=+ XESD=0002
 ESD=0001 LOC=00000008 LEN=4 SIGN=+ XESD=0003
 ESD=0001 LOC=0000000C LEN=4 SIGN=+ XESD=0002
 ESD=0001 LOC=00000010 LEN=4 SIGN=+ XESD=0003
 ESD=0001 LOC=00000010 LEN=4 SIGN=+ XESD=0003
 ESD=0001 LOC=00000014 LEN=4 SIGN=+ XESD=0002
 ESD=0001 LOC=00000014 LEN=4 SIGN=+ XESD=0002

Symbol Table Listing

 SYM=XXX      LOC=00000000 LEN=00000018 ESD=0001 TYPE=CST  XREF=2
 SYM=YYY      LOC=00000000 LEN=00000000 ESD=0002 TYPE=EXT  XREF=
 SYM=ZZZ      LOC=00000000 LEN=00000000 ESD=0003 TYPE=EXT  XREF=4 6 8

Literal Table Listing


AZ390I total mnote warnings = 0
AZ390I total mnote errors   = 0
AZ390I max   mnote level    = 0
AZ390I total mz390 errors   = 0
AZ390I total az390 errors   = 0
10:44:02 extrn     MZ390 ENDED   RC= 0 SEC= 0 MEM(MB)= 32 IO=66

And hex dump of the OBJ file:

0000000 02 c5 e2 c4 40 40 40 40 40 40 00 10 40 40 00 01
0000020 e7 e7 e7 40 40 40 40 40 00 00 00 00 07 00 00 18
0000040 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0000120 02 c5 e2 c4 40 40 40 40 40 40 00 0d 40 40 00 02
0000140 e8 e8 e8 40 40 40 40 40 02 40 40 40 00 40 40 40
0000160 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0000240 02 c5 e2 c4 40 40 40 40 40 40 00 0d 40 40 00 03
0000260 e9 e9 e9 40 40 40 40 40 02 40 40 40 00 40 40 40
0000300 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0000360 02 e3 e7 e3 40 00 00 00 40 40 00 10 40 40 00 01
0000400 00 00 00 04 00 00 00 04 00 00 00 04 00 00 00 04
0000420 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0000500 02 e3 e7 e3 40 00 00 10 40 40 00 08 40 40 00 01
0000520 00 00 00 04 00 00 00 04 40 40 40 40 40 40 40 40
0000540 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0000620 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0000640 00 03 00 01 0c 00 00 00 40 40 40 40 40 40 40 40
0000660 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0000740 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0000760 00 02 00 01 0c 00 00 04 40 40 40 40 40 40 40 40
0001000 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0001060 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0001100 00 03 00 01 0c 00 00 08 40 40 40 40 40 40 40 40
0001120 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0001200 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0001220 00 02 00 01 0c 00 00 0c 40 40 40 40 40 40 40 40
0001240 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0001320 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0001340 00 03 00 01 0c 00 00 10 40 40 40 40 40 40 40 40
0001360 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0001440 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0001460 00 03 00 01 0c 00 00 10 40 40 40 40 40 40 40 40
0001500 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0001560 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0001600 00 02 00 01 0c 00 00 14 40 40 40 40 40 40 40 40
0001620 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0001700 02 d9 d3 c4 40 40 40 40 40 40 00 08 40 40 40 40
0001720 00 02 00 01 0c 00 00 14 40 40 40 40 40 40 40 40
0001740 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0002020 02 c5 d5 c4 40 00 00 00 40 40 40 40 40 40 00 00
0002040 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
*
0002140


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Elardus Engelbrecht
Sent: Wednesday, August 26, 2015 5:05 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: V constants

Glen Hermannsfeldt wrote:

>I assembled:

>*  test V constants
>     EXTRN  XXX
>XXX  DC     V(XXX+4)
>     END

>with Z390.  It assembled the 4 into the constant without any error or warning 
>message.  Same with the EXTRN removed, or replaced by an ENTRY statement.

Can you please post the result of XREF and LIST? It would be interesting to see 
the resultant assembly and their offsets.

>A different question, is what does the linker do in this case?  
>For A constants, the linker adds the value assembled into the constant (the 
>offset).

Where? I'm not sure what offset in what sections are you referring?

I would like to compare that with Peter Relson's reply.

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to