11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

USING instructionLabeled USING instructionThe labeled USING instruction specifies a base address, one or more base registers,and a USING label which can be used as a symbol qualifier.Labeled USING►► label USING base(base ),end▼ ,base_register►◄222 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>labelis one of the following:v An ordinary symbolv A variable symbol that has been assigned a character string with a value thatis valid for an ordinary symbolbasespecifies a base address, which can be a relocatable or an absolute expression.The value of the expression must lie between 0 and 2 31 −1.endspecifies the end address, which can be a relocatable or an absolute expression.The value of the expression must lie between 0 and 2 31 −1. The end addressmay exceed the (base address + default range) without error. The end addressmust be greater than the base and must have the same relocatability attributes.base_registeris an absolute expression whose value represents general registers 0 through15.The default range is 4096 per base register.The essential difference between a labeled USING instruction and an ordinaryUSING instruction is the label placed on the USING statement. To indicate to theassembler that the USING established with the label is to provide resolution ofbase and displacement for a symbol, the label must be used to qualify the symbol.Qualifying a symbol consists of preceding the symbol with the label on the USINGfollowed by a period. The only symbols resolved by the labeled USING are thosesymbols qualified with the label. This label cannot be used for any other purposein the program, except possibly as a label on other USING instructions.The following examples show how labeled USINGs are used:PRIOR USING IHADCB,R10NEXT USING IHADCB,R2MVC PRIOR.DCBLRECL,NEXT.DCBLRECLThe same code without labeled USINGs could be written like this:USINGMVCIHADCB,R10DCBLRECL,DCBLRECL-IHADCB(R2)In the following example, a new element, NEW, is inserted into a doubly-linked listbetween two existing elements LEFT and RIGHT, where the links are stored aspointers LPTR and RPTR:

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

Saved successfully!

Ooh no, something went wrong!