< previous page page_172 next page >

Page 172
Table 3.21 Length (by class).
Commercial
I (a)Move characters32.6B
d87111c01013bcda00bb8640fdff6754.gif
(b)
Move decimal
d87111c01013bcda00bb8640fdff6754.gif
operand 1
4.2B
d87111c01013bcda00bb8640fdff6754.gif
operand 2
3.3B
IITest, compare, logical
d87111c01013bcda00bb8640fdff6754.gif
(as specified)
3.5B
d87111c01013bcda00bb8640fdff6754.gif
(as executed)
2.0B
IIIDecimal arithmetic
Operand 14.2B
Operand 22.5B

Table 3.22 Frequency of variable operand length instructions in R/M or R+M.
Commercial
# per 100 HLL ops
I (a)Move character
16
9%
d87111c01013bcda00bb8640fdff6754.gif
(b)
Move decimal
7
4%
IITest, compare, logical (character)
22
12%
IIIDecimal arithmetic
6
3%

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).

 
< previous page page_172 next page >