The instruction is: Op Code x, 0, CVB 7 5 6 50 Reg 7 (after) 00000000000000000110001111111010 Condition code: unchanged.
Convert to Decimal The binary contents of general register 3 are to be
converted into a packed decimal integer of 15 digits
and sign and stored in double-word location 2000. Assume: 00 00 00 40 00 00 18 60 Reg 4
Reg 15
Reg 3
Loc 2000 (before) 00000000 00000000 010 11 0 11 01000001 01 47 63 27 42 73 21 17
The instruction is:
op Code R, x, CVD I 3 4 15 100 Loc 2000 (after) 00 00 00 00 00 23 36 1 +
Condition code: unchanged.
Store Multiple The contents of general registers 14, 15, 0, and 1 are
to be stored in consecutive words starting with 4050. Assume:
Reg 14
Reg 15
Reg 0 Reg 1.
Reg 6
Loc 4050-4053 (before)
Loc 4054-4057 (before)
Loc 4058-4061 (before)
Loc 4062-4065 (before)
The instruction is: Op Code Ra 00 00 25 63 00 01 27 36
12 43 00 62
73 26 12 57 00 00 40 00 63 25 41 32
17 25 63 42 07 16 32 71
98 67 45 21 0, c=i_TM __ __ _____ 50 ____ Loc 4050-4053 (after)
Loc 4054-4057 (after)
Loc 4058-4061 (after)
Loc 4062-4065 (after)
Condition code: unchanged Decimal Add 00 00 25 63 00 01 27 36
12 43 00 62
73 26 12 57
The signed, packed decimal field at location 500-503 is to be added to the signed, packed decimal field at
location 2000-2002. Assume:
Reg 12
Reg 13
Loc 2000-2002 (before)
Loc 500-503 00 00 20 00 00 00 04 80 38 46 0- 01 1.2 34 5+
The instruction is: Op Code L, L, B, Loc 2000-2002 (after) 73 88 5+
Condition code = 2; sum is greater than zero. Zero and Add 0, 20 i'U The signed, packed decimal field at location 4500- 4502 is to be moved to location 4000-4004 with four
leading zeros in the result field.
Assume:
Reg 9
Loc 4000-4004 (before)
Loc 4500-4502 The instruction is: k 00 00 40 00 12 34 56 78 90 38 46 0- 0, a
O 2 500 i'U Loc 4000-4004 (after) 00 00 38 46 0- Condition code = 1.; sum is less than zero.
Compare Decimal The contents of location 700-703 are to be compared
algebraically with the contents of location 500-503. Assume:
Reg 12
Reg 13
Loc 700-703 Loc 500-503 The instruction is: 00 00 05 50 00 00 04 00 1.7 25 35 6+ 06 72 1.4 2+ 100 i'U Condition code = 2; first operand is high. Multiply Decimal The signed, packed decimal field in location 1200-1204 is to be multiplied by the signed, packed decimal field
in location 500-501, and the product is to be placed in
location 1200-1204. Assume:
Reg 4
Reg 6
Loc 1200-1.204 (before)
r ,oc 500-501 The instruction is: Op Code L, k Bl
Loc 1200-1204 (after)
Condition code: unchanged.
a 00 00 12 00 00 00 02 50 00 00 38 46 0- 32 1- I 6 I 250 01 23 45 66 0+ Appendix A 123
Divide Decimal The signed, packed decimal field at location 2000-2004 is to be divided by the packed decimal field at location 3000-3001.. Assume:
Reg 12
Reg 13
Loc 2000-2004 (before)
Loc 3000-3001 The instmction is: Op Code L, L, 8, 00 00 18 00 00 00 25 00 01 23 45 67 8+
32 1-
0, 200 113 I Loc 2000-2004 (after) 38 46 0- 01 8+ o. 500 i'iJ where the quotient is 38460- and the remainder is 018+. Condition code: unchanged.
Pack
Assume locations 1000-1004 contain the following: ZI Z2 Z:3 Z4 S5 where Z =: four-bit zone code S == four-bit sign code
The field is to be in packed format with two leading
zeros and placed in location 2500-2503. Reg 12
Reg 13
Loc 1000-1004 Loc 2500-2503 (before)
The instruction is: k L 00 00 10 00 00 00 25 00 ZI Z2 Z3 Z4 S5 ABC D
0,
o
Loc 2500-2503 (after) 00 12 34 5S Condition code: unchanged.
Unpack
o
Assume locations 2501-2503 contains the following
fields:
12 34 5S This field is to be put into zoned format and placed in
the locations 1000-1004 where: S is a four bit sign
code.
Reg 12
Reg 13
Loc 2501-2503 Loc 1000··1004 (before)
The instruction is: k L 4121121 0 and results in 00 00 10 00 00 00 25 00 12 34 5S ABC D E
0, B.
Loc 1000-1004 (after) ZI Z2 Z3 Z4 S5 where Z is a four-bit zone code.
Condition codc: unchanged.
124
Move with Offset The unsigned three-byte field at location 4500-4502 is
to be moved to location 5600-5603 and given the sign
of the one byte field located at 5603. Assume: Reg 12
Reg 15
Loc 5600-5603 (before)
Loc 4500-4502 The instruction is: Op Code L, L2 8, Loc 5600-5603 (after)
Condition code: unchanged.
Move Immediate 00 00 50 00 00 00 40 00 77 88 99 0+ 12 34 56
0, B. 600 115 1 01 23 45 6+
O 2 500 i'iJ A dollar sign ($) is to be placed in location 2100, leaving locations 2101-2105 unchanged. Let Z rep­
resent a four-bit zone.
Assume:
Reg 12
Loe 2100-2105 (before)
The instruction is: Op Code MVI $
Loc 2100-2105 (after)
Condition code: unchanged.
Move Numeric 00 00 20 00 ZO ZI Z2 Z3 Z5 ZO 8, 0, 12 100 $ ZI Z2 Z3 Z5 ZO Let Z and Y represent four-bit zones. The numeric
parts of the eight-bit characters in the field at locations 6070-6074 are to be replaced by the numeric parts of
eight-bit characters at locations 8080-8084. Assume: Reg 12 Beg 15
Loc 6070-6074 (before)
Loc 8080-8084 The instruction is: 00 00 60 00 00 00 80 00 Yl Y2 Y3 Y4 Y5 Z3 Z6 Z9 Z7 Z8 Loe 6070-6074 (after) Y3 Y6 Y9 Y7 Y8
Condition code: unchanged.
Move Zones
Let Z and Y represent four-bit zones in the eight-bit
characters making up the fields at location 2006-2010 and 3007-3011, respectively. The zones of the field at 2006-2010 arc to be replaced by the zones from loca­
tion 3007-3011.
Previous Page Next Page