CHAPTER 2 MEMORY SPACE
2.2Memory Space and Addressing
In addressing by the
Therefore, the use of the proper addressing mode increases the code efficiency of instructions.
■Memory Space and Addressing
The
•Direct addressing: Specify the lower 8 bits of the address using the operand. The accesses of operand address 00H to 7FH are always 0000H to 007FH. The accesses of operand address 80H to FFH are mapped to 0080H to 047FH by setting of direct bank pointer (DP).
[Structure] [← OP code →] [← lower 8 bits →] ([← if operand available →]
•Extended addressing:Specify all 16 bits using the operand.
[Structure] [← OP code →] [← upper 8 bits →] [← lower 8 bits →]
•Bit direct addressing:Specify the lower 8 bits of the address using the operand. The accesses of operand address 00H to 7FH are always 0000H to 007FH. The accesses of operand address 80H to FFH are mapped to 0080H to 047FH by setting of direct bank pointer (DP).
The bit positions are included in the OP code. [Structure] [← OP code: bit →] [← lower 8 bits →]
•Indexed addressing: Add the 8 bits of the operand to the index register (IX) together with the sign and use the result as the address.
[Structure] [← OP code →] [← 8 offset bits →] ([← if operand available →])
•Pointer addressing: Use the contents of the extra pointer (EP) directly as the address.
[Structure] [← OP code →]
•
included in the OP code.
[Structure] [← OP code: register →]
•Immediate addressing:Use one byte following the OP code as data. [Structure] [← OP code →] [← Immediate data →]
•Vector addressing: Read the data from a table corresponding to the table number. The table numbers are included in the OP code.
[Structure] [← OP code: table →]
•Relative addressing: Calculate the address relatively to the contents of the current PC. This addressing mode is used during the execution of the relative jump and bit check instructions.
[Structure] [← OP code: table →] [← 8 bit relative value →]
Figure 2.2-1 shows the memory space accessible by each addressing mode.
7