Hitachi AP1 Data Book page 123

4-bit single-chip microcomputer
Table of Contents

Advertisement

--------------------------------------------------------HMCS47C,HMCS47CL
0.
_ _ _ _ _ 0,
ROM
:
:
;
: :
ST1
I : : : : : : : : : :
ST2
ST3
:
:
:
:
ST4
Figure 10 Subroutine Jump Stacking Order
Subroutine Jump to Bank 0
LAI
15
,-i...RA
7
~~PU
5 '
R,o
=
"1" (R,o
=
"0")
CALL 5-3F
CAL
3F;
(Subroutine Jump to Bank 0 5-3F (5-3F))
LAI
15
LBA
'-LRA
7
: COMB
'-LPU
31'
R,o
=
"1" (R,o
=
"0")
CALL 3-3F
CAL
3F
J
(Subroutine Jump to Bank 0 31-3F (31-3F))
Subroutine Jump to Bank 1
LAI
0
'-LRA
7
~.LPU
15
~
R,o
=
"0"
('Fr,;;
=
"1")
CALL 15-3F
CAL
,3F)
(Subroutine Jump to Bank 1 15-3F (47-3F))
LAI
0
LTA
,-LRA
7
: LVI
3
R,o
=
"0" (R,o
=
"1")
: XMA
'·LPU
10 '
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 (1,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 (I6 digits in
all). The memory register can be exchanged with the accumu-
lator by XAMR instruction.
121
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 addres-
sed 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
"I" 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 13.

Advertisement

Table of Contents
loading

Table of Contents