At 16:28 +0100 on 05/18/2015, Jonathan Scott wrote about Re: USING 0,0:

I think there's some confusion going on about the START
instruction.  This instruction does NOT say that the program
starts at an absolute location.  It merely says that locations
within the program should be counted starting from that value,
which is of course useful if the program is to be loaded by a
non-relocating loader into fixed low storage, as the unrelocated
addresses will already be correct.

The start label is therefore relocatable for Assembler purposes,
so if you want to tell the assembler how to resolve addresses,
you have to tell it separately to assume how to address it, for
example as follows:

XXX      START 1000
         USING XXX-1000,0

Note that if you specify a zero base register with any expression
which does not equal zero before relocation, then message
ASMA302W is issued and, as documented for that message, HLASM
ignores the specified offset and uses location zero instead.

This works if, as noted, you plan to load the code at 1000. The advantage of using the START as opposed to a CSECT is that the location addresses in the listing will be correct.

Reply via email to