gtpg2m0hGeneral Macros

ALPHA-Alphabetic Scan

This general macro scans a specified field from left to right to detect the presence of either an alphabetic character (A-Z) or a nonalphabetic character, stopping when the requested character set is found. The Translate and Test (TRT) instruction is used, limiting the size of the field scanned to a maximum of 256 bytes.

After a successful scan for an alphabetic character, the alpha group number, used for passenger names in airline reservation systems is given in R2. (An alpha group is a set of alphabetic characters. The entire alphabet is divided into a series of mutually exclusive alpha groups.)

Format




label
A symbolic name can be assigned to the macro statement.

STOP
This parameter has two possible values:

YES
This causes a scan to stop on the first alphabetic character detected. This is the default.

NOT
This causes a scan to stop on the first nonalphabetic character detected.

MAX
This parameter has either a numeric or symbolic value.

(literal)
A decimal number equal to or less than 256, which defines the number of bytes to be scanned from the address in R1.

(symbol1)
The symbolic address of a general register containing the number of bytes minus 1 (-1) to be scanned from the address in R1. The contents must be less than 256.

Entry Requirements

Return Conditions

Programming Considerations

Do not use R0 because it is used in the EX instruction.

Examples

None.