18.08.2013 Views

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CABSAD$, CRELAD$–Addressing Routines<br />

Parameters<br />

t<br />

See 6.1.<br />

CRELAD$<br />

CRELAD$ is the function code that determines which of the absolute addressing<br />

routines is called by C$RELAD. It must be enclosed by apostrophes.<br />

abs-addr<br />

Absolute address that is to be converted to a relative address.<br />

If this parameter is omitted, then the routine uses the value in register A0 for<br />

abs-addr.<br />

pkt-addr<br />

See 6.1<br />

Normal Return<br />

If CRELAD$ returns normally, registers A2 and A3 contain an element name that is<br />

left-justified and space-filled. The relative address values corresponding to the input<br />

absolute address are in two registers: register A1 contains a location counter number,<br />

and register A0 contains an address relative to that location counter.<br />

If the input value in register A0 is not in the range of the program, then register A0 is<br />

unchanged, register A1 is set to zero, the register pair A2, A3 is filled with the Fieldata<br />

characters "*ABSOLUTE*", and the normal return is taken. This case also occurs if the<br />

collection of the absolute is done with the Z option on the call to the Collector. When<br />

the Z option is used on the Collector call, the diagnostic tables are not included in the<br />

absolute element produced, and relative addresses cannot be computed.<br />

On normal return, registers A4 and A5 contain the location counter limits or zeros if the<br />

address was absolute. Register A4 equals the location counter lower limit - 1, and A5<br />

equals the location counter upper limit. The following instruction skips the instruction<br />

immediately after it if x contains an address in the same element and location counter<br />

range as the address on the call to CRELAD$ that computed A4 and A5.<br />

TW A4,x<br />

The calling program can save the computation by calling CRELAD$ using registers A1,<br />

A2, and A3 and computing A0 = x-(A4+1).<br />

The routine must be part of the main segment. Only one activity can use CRELAD$ at<br />

one time.<br />

If more than one element in different segments has addresses corresponding to the<br />

given absolute address, the one in main storage is used. If there is no element in main<br />

storage, an error condition exists.<br />

6–10 7833 1733–004

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!