Address constant
Address constant
Main page

Address constant

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
Address constant

In IBM System/360 through present day z/Architecture, an address constant or "adcon" is an assembly language data type which contains the address of a location in computer memory. An address constant can be one, two, three or four bytes long, although an adcon of less than four bytes is conventionally used to hold an expression for a small integer such as a length, a relative address, or an index value, and does not represent an address at all. Address constants are defined using an assembler language "DC" statement.

Other computer systems have similar facilities, although different names may be used.

A adcons normally store a four byte relocatable address, however it is possible to specify the length of the constant. For example, AL1(stuff) defines a one-byte adcon, useful mainly for small constants with relocatable values. Other adcon types can similarly have length specification.

V type adcons store an external reference to be resolved by the link-editor.

Y is used for two byte (halfword) addresses. 'Y' adcons can directly address up to 32K bytes of storage, and are not widely used since early System/360 assemblers did not support a 'Y' data type. Early DOS/360 and BOS/360 systems made more use of Y adcons, since the machines these systems ran on had limited storage. The notation 'AL2(value)' is now usually used in preference to 'Y(value)' to define a 16 bit value.

Q address constants contain not actual addresses but a displacement in the External Dummy Section – similar to the Linux Global Offset Table (see Position-independent code). A J adcon is set by the linkage editor to hold the cumulative length of the External Dummy Section, and does not actually contain an address.

Other types of address constants are R which had special significance for TSS/360 to address the PSECT, and S, which stores an address in base-displacement format – a 16 bit value containing a four bit general register number and a twelve bit displacement, the same format as addresses are encoded in instructions.

System z supports types AD, JD, QD, and VD, which represent 8 byte (doubleword) versions of types 'A', 'J', 'Q', and 'V' to hold 64 bit addresses.

See all
User Avatar
No comments yet.