
ML66517 Family User’s Manual
Chapter 2
CPU Architecture
2 – 38
2.4.2 ROM Addressing
This addressing mode specifies addressing for program variables in the ROM space.
Available addressing formats include: immediate addressing, table data addressing and program code addressing.
(1) Immediate addressing
This addressing mode specifies access for immediate data included in the instruction code. For word-format
instructions, 2 bytes (N16) of the instruction code are accessed. For byte-format instructions, 1 byte (N8) of
the instruction code is accessed.
In the word-format, expressions have values in the range of 0 to 0FFFFH. In the byte-format, expressions
have values in the range of 0 to 0FFH. The assembler allows a range of signed and unsigned expressions for
immediate addressing. The word-format range is from –8000H to +0FFFFH and the byte-format range is
from –80H to +0FFH.
[Word format]
L
A, #1234H
MOV
X1, #WORD_ARRAY_BASE
[Byte format]
LB
A, #12H
MOV
X1, #BYTE_ARRAY_BASE
(2) Table data addressing
This addressing mode specifies access for 64KB in the table segment specified by TSR in ROM memory
space. This mode is used with the operands of LC, LCB, CMPC and CMPCB instructions.
A.
Direct table addressing
Tadr
B.
RAM addressing indirect table addressing
[**]
C.
RAM addressing indirect addressing with 16-bit base
T16[**]
A.
Direct table addressing
Two bytes of the instruction code specify an address in the table segment (addresses 0 to 0FFFFH: 64KB)
specified by TSR. Word-format or byte-format data at the specified address is accessed.
This addressing mode can be written by the following 4 instructions: LC, LCB, CMPC and CMPCB.
[Word format]
LC
A, VAR
CMPC
A, VAR
[Byte format]
LCB
A, VAR
CMPCB
A, VAR
B.
RAM addressing indirect table addressing
This indirect addressing mode uses the word-format data specified by RAM addressing as a pointer to the
table segment specified by TSR. Table memory can be accessed by placing a pointer to table memory in a
register or in data memory.
This addressing mode can be written by the following 4 instructions: LC, LCB, CMPC and CMPCB.
[Word format]
LC
A, [A]
CMPC
A, [1234[X1]]