Download Print this page

IBM 4300 Manual page 273

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

Advertisement

multiplies the number in register 7 by itself and
places the result in the pair of registers 6 and 7:
Register 6 contains 00 00 00 01.
Register 7 contains 00 OA 00 19.
MULTIPLY HALFWORD (MH)
The MUL T1PL Y HALFWORD instruction is used
to multiply the contents of a register by a halfword
in storage. For example, assume that:
Register 11 contains 0000 00 15 =2110 = the
multiplicand.
Register 14 contains 00 00 01 00.
Register 15 contains 00 00 20 00.
Storage locations 2102-2103 contain FF D9
==
-39
==
the
multiplier.
The instruction:
Machine Format
Op Code
4C
B
E
Assembler Format
Op Code
Rl,02(X2,B2)
MH
11 ,2 ( 14, 15)
multiplies the two numbers. The product, FF FF
FC CD
=
-819
10 ,
replaces the original contents of
register 11.
Only the rightmost 32 bits of a product are
stored in a register; any significant bits on the left
are lost. No program interruption occurs on
overflow.
OR (0, OR, 01, OC)
When the Boolean operator OR is applied to two
bits, the result is one when either bit is one;
otherwise, the result is zero. When two bytes are
ORed, each pair of bits is handled separately; there
is no connection from one bit position to another.
The following is an example of
~Ring
two bytes:
First-operand byte:
Second-operand byte:
Result byte:
Or (01)
0011 01012
0101 11002
0111 11012
A frequent use of the OR instruction is to set a
particular bit to one. For example, assume that
storage location 4891 contains 0100 0010 2 . To set
A-20
IBM 4300 Processors Principles of Operation
the rightmost bit of this byte to one without
affecting the other bits, the following instruction
can be used (assume that register 8 contains 00 00
48 90):
Machine Format
Op Code
12
B 1
01
96
01
8
I
001 1
Assembler Format
Op Code
01(Bl),12
01
1(8),X·Ol·
When this instruction is executed, the byte in
storage is ORed with the immediate byte (the 12
field of the instruction):
Location 4891:
Immediate byte:
Result:
0100 00102
0000 00012
0100 00112
The resulting byte with bit 7 set to one is stored
back in location 4891. Condition code 1 is set.
PACK (PACK)
Assume that storage locations 1000-1003 contain
the following zoned-decimal number that is to be
converted to a packed-decimal number and left in
the same location:
1000
1003
Zoned number IF11F21F31C41
Also assume that register 12 contains 00 00 10
00. After the instruction:
Machine Format
Op ,Code
F2
3
3
C
I
0001
C
I
0001
Assembler Format
Op Code
Dl(L1,B1),D2(L2,B2)
PACK
0(4,12),0(4,12)

Advertisement

loading