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

Assembler Language Structure Conditional Assembly Instructions ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ │ │ │ │ │ │ NAME │ │ OPERATION │ │ OPERAND │ │ Field │ │ Field │ │ Field │ │ │ │ │ │ │ │ │ │ │ │ │ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ │ │ │ ▼ Which │ │ │ can be │ │ ┌────────────┴────────────┐ ▼ Which ▼ Which ▼ ▼ │ must be │ can be ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ │ │ │ │ │ │ │ │ │ Sequence │ │ Variable │ │ A symbolic │ │ Zero or more │ │ Symbol │ │ Symbol │ │ Operation │ │ operands │ │ or space │ │ │ │ Code │ │ │ │ (e.g. .SEQ) │ │ (e.g. &VAR) │ │ │ │ │ └───────────────┘ └───────────────┘ └───────────────┘ └───────┬───────┘ │ ▼ Composed of ┌─────────────────────────┬─────────────────────────┬─────────────────────────┤ ▼ ▼ ▼ ▼ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ │ │ │ │ │ │ │ │ │ Sequence │ │ Variable │ │ Expression │ │ (Exp)seq─sym │ │ Symbol │ │ Symbol │ │ or │ │ (e.g. │ │ │ │ │ │ (Expression) │ │ (&A EQ 1).SEQ)│ │ │ │ │ │ │ │ │ └───────────────┘ └───────────────┘ └───────┬───────┘ └───────────────┘ │ ▼ Which can be any │ combination of │ variable symbols │ and other characters │ that constitute an ┌─────────────────────────┼─────────────────────────┐ ▼ ▼ ▼ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ │ │ │ │ │ │ │ Arithmetic │ │ Logical │ │ Character │ │ Expression │ │ Expression │ │ Expression │ │ │ │ (e.g. │ │ │ │ (e.g. &A+1) │ │ (&B1 OR &B2)) │ │ (e.g. 'JAN&C')│ └───────────────┘ └───────────────┘ └───────────────┘ Figure 10. Conditional Assembly Instructions Macro instruction statements are described in Figure 11 on page 27. 26 HLASM V1R5 Language Reference

Assembler Language Structure Macro Instructions Prototype ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ Statement │ │ │ │ │ │ │ Symbolic │ │ Symbolic │ │ Zero or more │ │ Parameter │ │ Operation │ │ Symbolic │ │ │ │ Code │ │ Parameters │ │ │ │ │ │ │ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ │ │ │ ▼ Which can be ▼ Must be the ▼ Which can be │ │ same as │ │ │ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │ Macro ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ Instruction │ │ │ │ │ │ Statement │ NAME │ │ OPERATION │ │ OPERAND │ │ Field │ │ Field │ │ Field │ │ │ │ │ │ │ └───────┬───────┘ └───────────────┘ └───────┬───────┘ ▼ ▼ │ ┌───────┴───────┐ │ │ │ │ │ Zero or more │ │ │ Operands │ │ │ │ │ │ │ │ └───────┬───────┘ │ │ ▼ Which can be ▼ Which can be ┌─────────────────────┴─────────────────────┐ ┌──────────┴──────────┐ ▼ ▼ ▼ ▼ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ │ │ │ │ │ │ │ │ │ A Symbol │ │ Character │ │ Operands with │ │ Sublists with │ │ │ │ String │ │ one value │ │ one or more │ │ │ │ │ │ │ │ entries │ │ │ │ │ │ │ │ │ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ ▼ ▼ ▼ ▼ │ │ │ ┌───────┴───────┐ │ │ │ │ │ │ │ │ │ Each entry │ │ │ │ │ can have a │ │ │ │ │ value │ │ │ │ │ │ │ │ │ └───────┬───────┘ │ ▼ ▼ ▼ │ └────────────────────────────┴──────────┬──────────┘ │ │ ▼ Which can be ▼ Which can be ├─────────────────────┬─────────────────────┐ ┌──────────┴──────────┐ ▼ ▼ ▼ ▼ ▼ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ │ │ │ │ │ │ │ │ │ │ │ Ordinary │ │ Sequence │ │ Variable │ │ Character │ │ 'Character │ │ Symbol │ │ Symbol │ │ Symbol │ │ String │ │ String' │ │ (or space) │ │ │ │ │ │ (excluding │ │ (including │ │ │ │ │ │ │ │ spaces and │ │ spaces) │ │ │ │ │ │ │ │ commas) │ │ │ │ │ │ │ │ │ │ │ │ │ └───────────────┘ └───────────────┘ └───────────────┘ └───────────────┘ └───────────────┘ Figure 11. Macro Instructions Chapter 2. Coding and Structure 27

Assembler <strong>Language</strong> Structure<br />

Conditional Assembly Instructions<br />

┌───────────────┐ ┌───────────────┐ ┌───────────────┐<br />

│ │ │ │ │ │<br />

│ NAME │ │ OPERATION │ │ OPERAND │<br />

│ Field │ │ Field │ │ Field │<br />

│ │ │ │ │ │<br />

│ │ │ │ │ │<br />

└───────┬───────┘ └───────┬───────┘ └───────┬───────┘<br />

│ │ │<br />

▼ Which │ │<br />

│ can be │ │<br />

┌────────────┴────────────┐ ▼ Which ▼ Which<br />

▼ ▼ │ must be │ can be<br />

┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐<br />

│ │ │ │ │ │ │ │<br />

│ Sequence │ │ Variable │ │ A symbolic │ │ Zero or more │<br />

│ Symbol │ │ Symbol │ │ Operation │ │ operands │<br />

│ or space │ │ │ │ Code │ │ │<br />

│ (e.g. .SEQ) │ │ (e.g. &VAR) │ │ │ │ │<br />

└───────────────┘ └───────────────┘ └───────────────┘ └───────┬───────┘<br />

│<br />

▼ Composed of<br />

┌─────────────────────────┬─────────────────────────┬─────────────────────────┤<br />

▼ ▼ ▼ ▼<br />

┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐<br />

│ │ │ │ │ │ │ │<br />

│ Sequence │ │ Variable │ │ Expression │ │ (Exp)seq─sym │<br />

│ Symbol │ │ Symbol │ │ or │ │ (e.g. │<br />

│ │ │ │ │ (Expression) │ │ (&A EQ 1).SEQ)│<br />

│ │ │ │ │ │ │ │<br />

└───────────────┘ └───────────────┘ └───────┬───────┘ └───────────────┘<br />

│<br />

▼ Which can be any<br />

│ combination of<br />

│ variable symbols<br />

│ and other characters<br />

│ that constitute an<br />

┌─────────────────────────┼─────────────────────────┐<br />

▼ ▼ ▼<br />

┌───────┴───────┐ ┌───────┴───────┐ ┌───────┴───────┐<br />

│ │ │ │ │ │<br />

│ Arithmetic │ │ Logical │ │ Character │<br />

│ Expression │ │ Expression │ │ Expression │<br />

│ │ │ (e.g. │ │ │<br />

│ (e.g. &A+1) │ │ (&B1 OR &B2)) │ │ (e.g. 'JAN&C')│<br />

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

Figure 10. Conditional Assembly Instructions<br />

Macro instruction statements are described in Figure 11 on page 27.<br />

26 <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!