MASK

An array of integers with a total size of 32 bytes and which must start on an aligned i4 boundary. (i)

Discussion

The MASK qualifier specifies activation characters at the statement level, to enable you to replace those specified by the ACCHR, ACESC, DACHR, or DAESC subroutines if you have opened a serial or terminal device other than the console (TT:). MASK is used with the GETS statement.

The act_char argument is a series of 256 bits corresponding to the ASCII character codes 0-255. If a bit is set, that character is an activation character.

To terminate on a CR or LF, for example, do the following:

1.

Create an array of 256 bits:

actchar ,[32]i1

(Each i1 is 8 bits, and 8 x 32 = 256.)

2.

Determine the values of CR and LF (13 and 10, respectively).

3.

Because the lowest order bit corresponds to 0 rather than 1, subtract 1 from each value (resulting in 12 and 9, respectively).

4.

Set bit 12 and bit 9 in the array (bits 5 and 2 of the second byte, or values 16 and 2, which makes 18).