|
|
Table 3.21 Length (by class). |
| | Commercial | | I (a) | Move characters | 32.6B |  |
|
|
|
|
(b) |
|
|
|
| Move decimal | | |  |
|
|
|
|
operand 1 |
|
|
|
| 4.2B | |  |
|
|
|
|
operand 2 |
|
|
|
| 3.3B | II | Test, compare, logical | | |  |
|
|
|
|
(as specified) |
|
|
|
| 3.5B | |  |
|
|
|
|
(as executed) |
|
|
|
| 2.0B | III | Decimal arithmetic | | | Operand 1 | 4.2B | | Operand 2 | 2.5B |
|
|
Table 3.22 Frequency of variable operand length instructions in R/M or R+M. | | | | | I (a) | Move character | | |  |
|
|
|
|
(b) |
|
|
|
| Move decimal | | | II | Test, compare, logical (character) | | | III | Decimal arithmetic | | |
|
|
|
|
|
|
incident rightmost bytes. Table 3.21 indicates operand lengths from the decimal instructions in a Cobol object mix. |
|
|
|
|
|
|
|
|
There are basically six generic decimal instructions (all MM format): Pack (PACK), Unpack (UNPK), Add (ADD.P), Subtract (SUB.P), Multiply (MPY.P), and Divide (DIV.P). The Pack instruction takes the second operand and translates it from character or digit-per-byte representation to the packed two-digit-per-byte representation used in arithmetic processing. Unpack is the complementary operation. The four basic arithmetic operations follow expected conventions by using the format first operand OP second operand ® first operand, and by keeping all operands in memory with length not exceeding 16 bytes. |
|
|
|
|
|
|
|
|
Length of String Operands Character and decimal operands have variable length (up to 256 bytes for character operands). Since execution time is almost always a function of operand length, the distribution of these operands is important. For execution purposes, character and decimal operations fall into one of three distinct types: |
|
|
|
|
|
|
|
|
1. One source operand (of variable size) and a separate result operand (of variable size). Included here is MOVE.C. Certain decimal instructions form a separate sub-class (ZMOVE.P, PACK, and UNPK). |
|
|
|
|
|