3-10-3 Records

The RECORD directive is for defining a bit pattern within a word or byte. It has the form

Record name   RECORD   Field specification, . . . , Field specification
where each field specification is of the form
Field name: Length = Preassignment
with the preassignment being optional. For example,
PATTERN     RECORD    OPCODE:5,MODE:3,OPR1:4=8,OPR2:4
would break a word into four fields and give them the names OPCODE, MODE, OPR1, and OPR2. The lengths of the fields in bits would be 5, 3, 4, and 4, respectively.

The statement

INSTRUCTION    PATTERN     (,,,5)
would actually reserve the word, associate it with the variable INSTRUCTION, and preassign OPR1 to 8 and OPR2 to 5 as shown in Fig. 3-61.

Figure 3-61 Typical use of RECORD to subdivide a word.


Table of Contents | Next page | Previous page

This is page 46.