EM73962A
4-BIT MICROCONTROLLER
B
XA2
:
;--------------- -------------------- -------------------- -------------------- --
BANK 2
XB1 :
:
:
B
XB
:
XB2 :
:
B
XB2
:
;--------------- -------------------- -------------------- -------------------- --
BANK 3
XC1 :
:
:
B
XC
:
XC2 :
:
B
XC2
Fixed data can be read out by table-look-up instruction. Table-look-up instruction is depended on the Data
Pointer (DP) to ROM address, then to get the ROM code data :
LDAX
LDAXI
Acc ← ROM[DP]L
Acc
←
ROM[DP] ,DP+1
H
DP is a 12-bit data register which can store the program ROM address to be the pointer for the ROM code data.
First, user load ROM address into DP by instruction "STADPL, STADPM, STADPH", then user can get the
lower nibble of ROM code data by instruction "LDAX" and higher nibble by instruction "LDAXI"
PROGRAM EXAMPLE: Read out the ROM code of address 1777h by table-look-up instruction.
LDIA #07h;
STADPL
STADPM
STADPH
:
; [DP]L ← 07h
;
[DP]
M
←
07h
; [DP]H ← 07h, Load DP=777h
LDL #00h;
LDH #03h;
LDAX
; ACC ← 6h
STAMI ; RAM[30] ← 6h
LDAXI ; ACC ← 5h
STAM
; RAM[31] ← 5h
;
ORG 1777h
DATA 56h;
DATA RAM ( 372-nibble )
There is total 372 - nibble data RAM from address 000 to 17Fh
Data RAM includes 3 parts: zero page region, stacks and data area.
* This specification are subject to be changed without notice.
10.8.2001 5