Download Print this page

IBM 4300 Manual page 274

Processors principles of operation for ecps: vse mode
Hide thumbs Also See for 4300:

Advertisement

is executed, the result in locations 1000-1003 is in
the packed-decimal format:
1000
1003
Packed number 10010112314cI
Notes:
1. This example illustrates the operation of
PACK when the first- and second-operand
fields overlap completely.
I
2. During the operation, the second operand was
extended on the left with zeros.
SHIFT LEFT DOUBLE (SLDA)
The SHIFT LEFT DOUBLE instruction is similar
to SHIFT LEFT SINGLE except that SLDA shifts
the 63 bits (not including the sign) of an even-odd
register pair. The R
1
field of this instruction must
be even. For example, if the contents of registers 2
and 3 are:
00 7F OA 72
FE DC BA 98
=
0000 0000 0111 1111 0000 1010 0111 0010
1111 1110 1101 1100 1011 1010 1001 10002
The instruction:
Machine Format
B2
02
8F
2
1////1
o
I
01FI
Assembler Format
Op Code
Rl,02(B2)
SLOA
2,31(0)
results in registers 2 and 3 both being left-shifted
31 bit positions, so that their new contents are:
7F 6E 50 4C
00 00 00 00
=
0111 1111 0110 1110 0101 1101 0100 1100
0000 0000 0000 0000 0000 0000 0000 00002
In this case, a significant bit is shifted out of bit
position 1 of register 2. Condition code 3 is set to
indicate this overflow and, if the fixed-point-
overflow mask bit in the PSW is one, a fixed-point
overflow interruption occurs.
SHIFT LEFT SINGLE (SLA)
Because SHIFT LEFT SINGLE leaves the sign bit
unchanged, this instruction performs an algebraic
shift. For example, if the contents of register 2
are:
00 7F OA 72
=
0000 0000 0111 1111 0000 1010 0111 00102
The instruction:
Machine Format
B2
02
o
I
008
1
Assembler Format
Op Code
Rl,02(B2)
SLA
2,8(0)
results in register 2 being shifted left eight bit
positions so that its new contents are:
7F OA 72 00
=
0111 1111 0000 1010 0111 0010 0000 00002
Condition code 2 is set to indicate that the result
is nonzero and positive.
If
a left shift of nine places had been specified, a
significant bit would have been shifted out of bit
position 1. Condition code '3 would have been set
to indicate this overflow and, if the fixed-point-
overflow mask bit in the PSW is one, a fixed-point
overflow interruption would have occurred.
STORE CHARACTERS UNDER MASK
(STCM)
STORE CHARACTERS UNDER MASK (STCM)
may be used to place selected bytes from a register
into storage. For example, if it is desired to store a
three-byte address from general register 8 into
location FIELD3, assume:
Machine Format
Op Code
Rl
S2
BE
8
7
*
'i~
* *
Register Format
STCM
8,B ' Ol11
1
,FIEL03
Appendix A. Number Representation and Instruction-Use Examples
A-21

Advertisement

loading