18
ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
M8C Microprocessor
2.5
Addressing Modes
The M8C has ten addressing modes:
■
■
■
.
■
“Destination Direct” on page 20
.
■
“Destination Indexed” on page 20
■
“Destination Direct Source Immediate” on page 21
.
■
“Destination Indexed Source Immediate” on page 21
.
■
“Destination Direct Source Direct” on page 22
.
■
“Source Indirect Post Increment” on page 22
■
“Destination Indirect Post Increment” on page 23
.
2.5.1
Source Immediate
For these instructions, the source value is stored in operand 1 of the instruction. The result of these
instructions is placed in either the M8C CPU_A, CPU_F, or CPU_X register as indicated by the
instruction’s opcode. All instructions using the Source Immediate addressing mode are two bytes in
length.
Source Immediate Examples:
Table 2-7. Source Immediate
Opcode
Operand 1
Instruction
Immediate Value
Source Code
Machine Code
Comments
ADD
A, 7
01 07
The immediate value 7 is added to the Accumulator.
The result is placed in the Accumulator.
MOV
X, 8
57 08
The immediate value 8 is moved into the CPU_X
register.
AND
F, 9
70 09
The immediate value of 9 is logically AND’ed with
the CPU_F register and the result is placed in the
CPU_F 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 ...