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 />

Macro Instructions<br />

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

Statement │ │ │ │ │ │<br />

│ Symbolic │ │ Symbolic │ │ Zero or more │<br />

│ Parameter │ │ Operation │ │ Symbolic │<br />

│ │ │ Code │ │ Parameters │<br />

│ │ │ │ │ │<br />

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

│ │ │<br />

▼ Which can be ▼ Must be the ▼ Which can be<br />

│ │ same as │<br />

│ │ │<br />

─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─<br />

─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─<br />

│ │ │<br />

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

Instruction │ │ │ │ │ │<br />

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

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

│ │ │ │ │ │<br />

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

▼<br />

▼<br />

│<br />

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

│ │ │<br />

│ │ Zero or more │<br />

│ │ Operands │<br />

│ │ │<br />

│ │ │<br />

│<br />

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

│<br />

│<br />

▼ Which can be<br />

▼ Which can be<br />

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

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

▼ ▼ ▼ ▼<br />

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

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

│ A Symbol │ │ Character │ │ Operands with │ │ Sublists with │<br />

│ │ │ String │ │ one value │ │ one or more │<br />

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

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

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

▼ ▼ ▼ ▼<br />

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

│ │ │ │ │<br />

│ │ │ │ Each entry │<br />

│ │ │ │ can have a │<br />

│ │ │ │ value │<br />

│ │ │ │ │<br />

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

│ ▼ ▼ ▼<br />

│<br />

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

│<br />

│<br />

▼ Which can be<br />

▼ Which can be<br />

├─────────────────────┬─────────────────────┐<br />

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

▼ ▼ ▼ ▼ ▼<br />

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

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

│ Ordinary │ │ Sequence │ │ Variable │ │ Character │ │ 'Character │<br />

│ Symbol │ │ Symbol │ │ Symbol │ │ String │ │ String' │<br />

│ (or space) │ │ │ │ │ │ (excluding │ │ (including │<br />

│ │ │ │ │ │ │ spaces and │ │ spaces) │<br />

│ │ │ │ │ │ │ commas) │ │ │<br />

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

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

Figure 11. Macro Instructions<br />

Chapter 2. Coding and Structure 27

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

Saved successfully!

Ooh no, something went wrong!