ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
19
M8C Microprocessor
2.5.2
Source Direct
For these instructions, the source address is stored in operand 1 of the instruction. During instruction
execution, the address will be used to retrieve the source value from RAM or register address space.
The result of these instructions is placed in either the M8C CPU_A or CPU_X register as indicated
by the instruction’s opcode. All instructions using the Source Direct addressing mode are two bytes
in length.
Source Direct Examples:
2.5.3
Source Indexed
For these instructions, the source offset from the CPU_X register is stored in operand 1 of the
instruction. During instruction execution, the current CPU_X register value is added to the signed off-
set, to determine the address of the source value in RAM or register address space. The result of
these instructions is placed in either the M8C CPU_A or CPU_X register as indicated by the instruc-
tion’s opcode. All instructions using the Source Indexed addressing mode are two bytes in length.
Source Indexed Examples:
Table 2-8. Source Direct
Opcode
Operand 1
Instruction
Source Address
Source Code
Machine Code
Comments
ADD
A, [7]
02 07
The value in memory at address 7 is added to the
Accumulator and the result is placed into the Accu-
mulator.
MOV
A, REG[8]
5D 08
The value in the register space at address 8 is
moved into the Accumulator.
Table 2-9. Source Indexed
Opcode
Operand 1
Instruction
Source Index
Source Code
Machine Code
Comments
ADD
A, [X+7]
03 07
The value in memory at address X+7 is added to the
Accumulator. The result is placed in the Accumula-
tor.
MOV
X, [X+8]
59 08
The value in RAM at address X+8 is moved into the
CPU_X register.
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...