--------------------------------------------------------HMCS46C,HMCS46CL
O.
_________
a.
ROM
: : ; : :
STl
I : : : : : : : : : :
ST2
ST3
: :
ST4
: :
Figure 10 Subroutine Jump Stacking Order
Subroutine
Jump
to
Bank 0
•
LAI
15
r-LRA
7
~·LPU
5)
R,o =
"1"
(R,o =
"0")
CALL
5-3F
CAL
3F
J
(Subroutine
Jump
to
Bank 0 5-3F (5-3F))
•
LAI
15
LBA
'-LRA
: COMB
'.LPU
31
1
R,o =
"1"
(R,o =
"0")
CALL
31-3F
CAL
3F
J
(Subroutine
Jump
to
Bank 0 31-3F (31-3F))
Subroutine
Jump
to
Bank 1
•
LAI
0
r-LRA
7
:.LPU
15
f
R,o =
"0"
(R,o =
"1")
CALL
15-3F
CAL
3F)
(Subroutine
Jump
to
Bank 1 15-3F (47-3F))
LAI
0
LTA
r-LRA
7
:
LVI
3
R,o =
"0"
(R,o =
"1")
:
XMA
~.LPU
10
1
CALL
10-2E
CAL
2E J
(Subroutine
Jump
to
Bank 1 10-2E (42-2E)
Figure
11
CALL
Example
•
RAM
RAM
is
a memory used for storing data and saving the con-
tents
of
the registers. Its capacity
is
256 digits
(l,024
bits)
where one digit consists
of
4 bits.
Addressing
of
RAM
is
performed by a matrix
of
the
file
No. and the digit No.
The
file
No.
is
set in the X register and the digit No. in the
Y register for reading, writing or testing. Specific digits in
RAM
can be addressed not
via
the X register and Y register. These
digits are called
"Memory Register (MR)", 0
to
15
(l6
digits in
all). The memory register can be exchanged with the accumu-
lator by XAMR instruction.
95
The
RAM
address space
is
shown in Figure 12.
In
an instruction in which reading from
RAM
and writing to
RAM
coexist (exchange between
RAM
and the register), reading
precedes writing and the write data does not affect the read
data.
The
RAM
bit
manipulation instruction enables any addressed
RAM
bit
to
be set, reset
or
tested. The bit assignment is specified
by the operand n
of
the instruction.
The bit test makes the Status F
IF
"1"
when the assigned bit
is
"1"
and makes it
"0"
when the assigned bit
is
"0".
Correspondence between the
RAM
bit and the operand n
is
shown in Figure
l3.