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

SETAF Instruction Alternative Statement Format: You can use the alternative statement format for extended SETx statements. The above coding could then be written as follows: &LIST(3) SETA 5, THIS IS X 1,, AN ARRAY X 2,25,3 SPECIFICATION SETAF Instruction Use the SETAF instruction to call an external function to assign any number of arithmetic values to a SETA symbol. You can assign a large number of parameters—the exact number depending on factors such as the size of the program and of virtual storage—to pass to the external function routine. The SETAF instruction can be used anywhere that a SETA instruction can be used. ►►──variable_symbol──SETAF──'function─name' ──┬─────────────────┬───►◄ │ ┌ ─────────────┐ │ └── ▼ ─,expression─┴─┘ variable symbol is a variable symbol. A global variable symbol in the name field must have been previously declared as a SETA symbol in a GBLA instruction. Local SETA symbols need not be declared in a LCLA instruction. The assembler considers any undeclared variable symbol found in the name field of a SETA instruction as a local SET symbol. The variable symbol is assigned a type attribute value of N. function_name the name of an external function load module. The name must be specified as a character expression, and must evaluate to a valid module name no longer than 8 bytes. Refer to Chapter 5, “Providing External Functions for Conditional Assembly” in the HLASM Programmer's Guide for information about external function load modules. expression is an arithmetic expression evaluated as a signed 32-bit arithmetic value. The minimum and maximum allowable values of the expression are −2 31 and +2 31 −1, respectively. See “SETA Instruction” on page 347 for further information about setting SETA symbols, and ways to specify arithmetic expressions. The function name must be enclosed in single quotes. For example: &MAX_VAL SETAF 'MAX',7,4 Calls the external function X MAX, passing values 7 and X 4 as operands. 388 HLASM V1R5 Language Reference

SETCF Instruction SETCF Instruction Use the SETCF instruction to call an external function to assign a character value to a SETC symbol. You can specify a large number of parameters—the exact number depending on factors such as the size of the program and of virtual storage—to pass to the external function routine. The SETCF instruction can be used anywhere that a SETC instruction can be used. ►►──variable_symbol──SETCF──'function─name' ─────────────────────────► ►──┬──────────────────────┬────────────────────────────────────────►◄ │ ┌ ──────────────────┐ │ └── ▼ ─,character_value─┴─┘ variable symbol is a variable symbol. A global variable symbol in the name field must have been previously declared as a SETC symbol in a GBLC instruction. Local SETC symbols need not be declared in a LCLC instruction. The assembler considers any undeclared variable symbol found in the name field of a SETC instruction as a local SET symbol. The variable symbol is assigned a type attribute value of U. The character value assigned to the variable symbol can have a string length in | the range 0 (for a null character string) through 1024. function_name the name of an external function load module. The name must be specified as a character expression, and must evaluate to a valid module name no longer than 8 bytes. Refer to Chapter 5, “Providing External Functions for Conditional Assembly” in the HLASM Programmer's Guide for information about external function load modules. character_value is a character value that may be specified by one of the following: A type attribute reference An operation code attribute reference A character expression A substring notation A concatenation of one or more of the above The character value can have a string length in the range 0 (for a null character | string) through 1024. When a SETA or SETB symbol is specified in a character expression, the unsigned decimal value of the symbol (with leading zeros removed) is the character value given to the symbol. See “SETC Instruction” on page 369 for further information about setting SETC symbols, and ways to specify character expressions. Chapter 9. How to Write Conditional Assembly Instructions 389

SETCF Instruction<br />

SETCF Instruction<br />

Use the SETCF instruction to call an external function to assign a character value<br />

to a SETC symbol. You can specify a large number of parameters—the exact<br />

number depending on factors such as the size of the program and of virtual<br />

storage—to pass to the external function routine.<br />

The SETCF instruction can be used anywhere that a SETC instruction can be<br />

used.<br />

►►──variable_symbol──SETCF──'function─name' ─────────────────────────►<br />

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

│ ┌<br />

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

│<br />

└── ▼ ─,character_value─┴─┘<br />

variable symbol<br />

is a variable symbol.<br />

A global variable symbol in the name field must have been previously declared<br />

as a SETC symbol in a GBLC instruction. Local SETC symbols need not be<br />

declared in a LCLC instruction. The assembler considers any undeclared<br />

variable symbol found in the name field of a SETC instruction as a local SET<br />

symbol. The variable symbol is assigned a type attribute value of U.<br />

The character value assigned to the variable symbol can have a string length in<br />

| the range 0 (for a null character string) through 1024.<br />

function_name<br />

the name of an external function load module. The name must be specified as<br />

a character expression, and must evaluate to a valid module name no longer<br />

than 8 bytes.<br />

Refer to Chapter 5, “Providing External Functions for Conditional Assembly” in<br />

the <strong>HLASM</strong> Programmer's Guide for information about external function load<br />

modules.<br />

character_value<br />

is a character value that may be specified by one of the following:<br />

A type attribute reference<br />

An operation code attribute reference<br />

A character expression<br />

A substring notation<br />

A concatenation of one or more of the above<br />

The character value can have a string length in the range 0 (for a null character<br />

| string) through 1024.<br />

When a SETA or SETB symbol is specified in a character expression, the unsigned<br />

decimal value of the symbol (with leading zeros removed) is the character value<br />

given to the symbol.<br />

See “SETC Instruction” on page 369 for further information about setting SETC<br />

symbols, and ways to specify character expressions.<br />

Chapter 9. How to Write Conditional Assembly Instructions 389

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

Saved successfully!

Ooh no, something went wrong!