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
Loc2000-2004 (before)
Loc3000-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 locations1000-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 location2500-2503. Reg 12
Reg 13
Loc1000-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
Loc2500-2503 (after) 00 12 34 5S Condition code: unchanged.
Unpack
o
Assume locations2501-2503 contains the following
fields:
12 345S This field is to be put into zoned format and placed in
the locations1000-1004 where: S is a four bit sign
code.
Reg 12
Reg 13
Loc2501-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.
Loc1000-1004 (after) ZI Z2 Z3 Z4 S5 where Z is a four-bit zone code.
Condition codc: unchanged.
124
Move withOffset The unsigned three-byte field at location 4500-4502 is
to be moved to location5600-5603 and given the sign
of the one byte field located at5603. Assume: Reg 12
Reg 15
Loc5600-5603 (before)
Loc4500-4502 The instruction is: Op Code L, L2 8, Loc 5600-5603 (after)
Condition code: unchanged.
MoveImmediate 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 2500 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
Loe2100-2105 (before)
The instruction is:Op Code MVI $
Loc2100-2105 (after)
Condition code: unchanged.
Move Numeric00 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 locations6070-6074 are to be replaced by the numeric parts of
eight-bit characters at locations8080-8084. Assume: Reg 12 Beg 15
Loc6070-6074 (before)
Loc8080-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 location2006-2010 and 3007-3011, respectively. The zones of the field at 2006-2010 arc to be replaced by the zones from loca
tion3007-3011.
Reg 12
Reg 13
Loc
Loc
32 1-
0,
Pack
Assume locations
The field is to be in packed format with two leading
zeros and placed in location
Reg 13
Loc
The instruction is:
0,
o
Loc
Unpack
o
Assume locations
fields:
12 34
the locations
code.
Reg 12
Reg 13
Loc
The instruction is:
0, B.
Loc
Condition codc: unchanged.
124
Move with
to be moved to location
of the one byte field located at
Reg 15
Loc
Loc
Condition code: unchanged.
Move
0,
O 2
resent a four-bit zone.
Assume:
Reg 12
Loe
The instruction is:
Loc
Condition code: unchanged.
Move Numeric
parts of the eight-bit characters in the field at locations
eight-bit characters at locations
Loc
Loc
Condition code: unchanged.
Move Zones
Let Z and Y represent four-bit zones in the eight-bit
characters making up the fields at location
tion