20
ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
M8C Microprocessor
2.5.4
Destination Direct
For these instructions, the destination address is stored in the machine code of the instruction. The
source for the operation is either the M8C CPU_A or CPU_X register as indicated by the instruction’s
opcode. All instructions using the Destination Direct addressing mode are two bytes in length.
Destination Direct Examples:
2.5.5
Destination Indexed
For these instructions, the destination offset from the CPU_X register is stored in the machine code
for the instruction. The source for the operation is either the M8C CPU_A register or an immediate
value as indicated by the instruction’s opcode. All instructions using the Destination Indexed
addressing mode are two bytes in length.
Destination Indexed Example:
Table 2-10. Destination Direct
Opcode
Operand 1
Instruction
Destination Address
Source Code
Machine Code
Comments
ADD
[7], A
04 07
The value in the Accumulator is added to memory at
address 7. The result is placed in memory at
address 7. The Accumulator is unchanged.
MOV
REG[8], A
60 08
The Accumulator value is moved to register space at
address 8. The Accumulator is unchanged.
Table 2-11. Destination Indexed
Opcode
Operand 1
Instruction
Destination Index
Source Code
Machine Code
Comments
ADD
[X+7], A
05 07
The value in memory at address X+7 is added to the
Accumulator. The result is placed in memory at
address X+7. The Accumulator is unchanged.
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 ...