Download Print this page

IBM 2030 Manual Of Instruction page 43

Processing unit, field engineering

Advertisement

System/360 as well as for addressing up
to 16 million bytes.
Since a program
can start anywhere in main storage, this
means that the base addresses for the
program must be 24 bits long.
The displacement range for any parti-
cular base address is 0-4095.
To
express this range requires 12 binary
bits.
(You can calculate this by con-
verting 4095 to hexadecimal and then to
binary.)
16l4095------..... - - F
----
I
I
161255---------F
I
---
1
J
I
1
161 15-----F
J
1
1--
1
I
1
o
I
I
I
I
1
I
1
I
I
1
I
I
-1. _ _ -'-
_.lo_
111111111111
Any byte in main storage can be
located by adding a 12 bit displacement
to a 24 bit base address.
The use of a base address and a dis-
placement certainly makes it easy to
relocate a program each time it is load-
ed into the computer.
However, we also
wanted a shorter instruction.
To put
both the base address and displacement
in the instruction would make the
instruction longer.
It would also mean
that each instruction would have to be
changed (base address) every time the
program is relocated.
The manner in
which the System/360 handles this is to
carry the base address in one of the
general registers.
When a general reg-
ister contains a 24 base address, it is
referred to as a base register.
The
address of the base register and the 12
bit displacement is carried in the
instruction.
Let's take a look at a typical
instruction used to add an operand in
main storage to an operand in one of the
general registers.
When only one of the
operands is in main storage, the
instruction is 2 halfwords in length.
To add a main storage operand (source
operand) to a general register operand,
(destination operand) several items are
necessary.
They are:
1.
8 bit Op Code
--,
2.
"
bit General
I
Distination
Register
1 Operand
Address
___ J
Address
---,
3.
" bit Base
I
Source
1 Operand.
I
4.
12 bit Displace-
1 Address
ment
___ J
The instruction format for this type
of operation would look like this:
r--------T-----T------T------T---------,
10
7
8
11
12
15 18
18 20
311
I
Op
tGen
I
IBase
IDisplace-1
1 Code
IReg. 1
IReg.
Iment
1
1
lAddr·1
IAddr. I
I
l _______
-.l. _____ .l. ______ .l. ______ .l. _________ J
Bits 12-15 of this instruction are
used for further modification of main
storage address.
We will ignore them
for the present and cover them later.
Given a displacement of 100110110010
and base register 11 whose contents are
shown below, the effective storage
binary address would be
010010001001110100100001.
3
31
r--------------------------------,
1000000000100100010010011011011111
l ________________________________ J
General Register 11
Remember that you add the 12 binary
bit displacement to the low order 24
binary bits of the base register.
The address generated by adding the
displacement and base address is used
for addressing main storage.
The origi-
nal instruction and the base register
remains unchanged.
As we said previously, only general
registers 1-15 can
be
used as base reg-
isters.
If general register 0 is speci-
fied as the base register, the base
address is assumed to be zero, regard-
less of the contents of register
o.
1-39

Advertisement

loading

This manual is also suitable for:

System/360 30