
161
CHAPTER 5 ADDRESSING
5.2.16 Based indexed addressing
[Function]
With this type of addressing, the register specified by the register specification code in the instruction word in the
register bank specified by the register bank selection flag (RBS2, RBS1, RBS0) is used as the base register, and
memory is addressed with the result of adding the value of a register specified in the same way to the contents
of this base register as offset data. The addition is performed with the offset data extended to 24 bits as a positive
number. A carry from the 24th bit is ignored.
The entire memory space can be addressed.
This type of addressing is used to specify in order data in an array in which one record consists of a number of
bytes of data.
The A, B, and C registers used in this addressing vary according to the value of the RSS bit in the PSW. When
RSS = 0, these registers are R1, R3, and R2 respectively, and when RSS = 1 they are R5, R7, and R6. RSS should
only be set to 1 when using a 78K/III Series program.
[Operand Format]
Performed when an instruction with one of the operand formats shown below is executed.
Identifier
Description Format
mem
[TDE + A], [TDE + B], [TDE + C], [WHL + A], [WHL + B], [WHL + C], [VVP + DE], [VVP + HL]
mem1
[TDE + A], [TDE + B], [TDE + C], [WHL + A], [WHL + B], [WHL + C], [VVP + DE], [VVP + HL]
[Description Example]
General example
AND A, mem
Specific example
AND A, [TDE+B] ; When based addressing using the sum of register TDE as mem and register B is selected
Record start address
→
WHL+C
→
WHL
→
Record start address
→
WHL + C manipulated with WHL
as record start address (When C = 2)
One record of array
: Specific data in each record
MOV A, [WHL+C]