HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

DROP Instruction DROP Instruction The DROP instruction ends the domain of a USING instruction. This: Frees base registers previously assigned by the USING instruction for other programming purposes Ensures that the assembler uses the base register you want in a particular coding situation, for example, when two USING ranges overlap or coincide If a control section has not been established, DROP will initiate an unnamed (private) control section ►►──┬─────────────────┬──DROP──┬─────────────────────┬─────────────►◄ └─sequence_symbol─┘ │ ┌─,───────────────┐ │ └── ▼ ┬─base_register─┬┴─┘ └─label─────────┘ sequence_symbol is a sequence symbol. base_register is an absolute expression whose value represents one of the general registers 0 through 15. The expression in base_register indicates a general register, previously specified in the operand of an ordinary USING statement, that is no longer to be used for base addressing. label is one of the following: An ordinary symbol A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol The ordinary symbol denoted by label must be a symbol previously used in the name field of a labeled USING statement or a labeled dependent USING statement. If neither base_register nor label is specified in the operand of a DROP instruction, all active base registers assigned by ordinary, labeled, and labeled dependent USING instructions are dropped. After a DROP instruction: The assembler does not use the register or registers specified in the DROP instruction as base registers. A register made unavailable as a base register by a DROP instruction can be reassigned as a base register by a subsequent USING instruction. The label or labels specified in the DROP instruction are no longer available as symbol qualifiers. A label made unavailable as a symbol qualifier by a DROP instruction can be reassigned as a symbol qualifier by a subsequent labeled USING instruction. The following statements, for example, stop the assembler using registers 7 and 11 as base registers, and the label FIRST as a symbol qualifier: 172 HLASM V1R5 Language Reference

DROP Instruction DROP 7,11 DROP FIRST Labeled USING: You cannot end the domain of a labeled USING instruction by coding a DROP instruction that specifies the same registers as were specified in the labeled USING instruction. If you want to end the domain of a labeled USING instruction, you must code a DROP instruction with an operand that specifies the label of the labeled USING instruction. Dependent USING: To end the domain of a dependent USING instruction, you must end the domain of the corresponding ordinary USING instruction. In the following example, the DROP instruction prevents the assembler from using register 12 as a base register. The DROP instruction causes the assembler to end the domain of the ordinary USING instruction and the domains of the two dependent USING instructions. The storage areas represented by INREC and OUTREC are both within the range of the ordinary USING instruction (register 12). USING ,12 USING RECMAP,INREC USING RECMAP,OUTREC . . DROP 12 . . INREC DS CL156 OUTREC DS CL156 To end the domain of a labeled dependent USING instruction, you can code a DROP instruction with the USING label in the operand. The following example shows this: USING ,12 PRIOR USING RECMAP,INREC POST USING RECMAP,OUTREC . . DROP PRIOR,POST . . INREC DS CL156 OUTREC DS CL156 In the above example, the DROP instruction makes the labels PRIOR and POST unavailable as symbol qualifiers. When a labeled dependent USING domain is dropped, none of any subordinate USING domains are dropped. In the following example the labeled dependent USING BLBL1 is not dropped, even though it is dependent on the USING ALBL2 that is dropped: Chapter 5. Assembler Instruction Statements 173

DROP Instruction<br />

DROP Instruction<br />

The DROP instruction ends the domain of a USING instruction. This:<br />

Frees base registers previously assigned by the USING instruction for other<br />

programming purposes<br />

Ensures that the assembler uses the base register you want in a particular<br />

coding situation, for example, when two USING ranges overlap or coincide<br />

If a control section has not been established, DROP will initiate an unnamed<br />

(private) control section<br />

►►──┬─────────────────┬──DROP──┬─────────────────────┬─────────────►◄<br />

└─sequence_symbol─┘<br />

│ ┌─,───────────────┐<br />

│<br />

└── ▼ ┬─base_register─┬┴─┘<br />

└─label─────────┘<br />

sequence_symbol<br />

is a sequence symbol.<br />

base_register<br />

is an absolute expression whose value represents one of the general registers<br />

0 through 15. The expression in base_register indicates a general register,<br />

previously specified in the operand of an ordinary USING statement, that is no<br />

longer to be used for base addressing.<br />

label<br />

is one of the following:<br />

An ordinary symbol<br />

A variable symbol that has been assigned a character string with a value<br />

that is valid for an ordinary symbol<br />

The ordinary symbol denoted by label must be a symbol previously used in the<br />

name field of a labeled USING statement or a labeled dependent USING<br />

statement.<br />

If neither base_register nor label is specified in the operand of a DROP instruction,<br />

all active base registers assigned by ordinary, labeled, and labeled dependent<br />

USING instructions are dropped.<br />

After a DROP instruction:<br />

The assembler does not use the register or registers specified in the DROP<br />

instruction as base registers. A register made unavailable as a base register<br />

by a DROP instruction can be reassigned as a base register by a subsequent<br />

USING instruction.<br />

The label or labels specified in the DROP instruction are no longer available as<br />

symbol qualifiers. A label made unavailable as a symbol qualifier by a DROP<br />

instruction can be reassigned as a symbol qualifier by a subsequent labeled<br />

USING instruction.<br />

The following statements, for example, stop the assembler using registers 7 and 11<br />

as base registers, and the label FIRST as a symbol qualifier:<br />

172 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!