ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
11
2.
M8C Microprocessor
This chapter covers internal M8C registers, address spaces, instruction summary and formats, and
addressing modes for the M8C microprocessor. The M8C is a 4 MIPS 8-bit Harvard architecture
microprocessor. Code selectable processor clock speeds from 93.7 kHz to 24 MHz allow the M8C to
be tuned to a particular application’s performance and power requirements. The M8C supports a rich
instruction set which allows for efficient low-level language support. For a detailed description of all
M8C instructions, refer to the
M8C Instruction Set chapter on page 37
.
2.1
Internal Registers
The M8C has five internal registers that are used in program execution:
■
Accumulator (
A
)
■
Index (
X
)
■
Program Counter (
PC
)
■
Stack Pointer (
SP
)
■
Flags (
F
)
All of the internal M8C registers are 8 bits in width, except for the
PC
(CPU_PC register) which is 16
bits wide. Upon reset,
A
,
X
,
PC
, and
SP
are reset to
0x00.
The Flag register CPU_F (
F
) is reset to
0x02
indicating that the
Z
flag is set.
With each stack operation, the
SP
is automatically incremented or decremented so that it always
points at the next stack byte in Random Access Memory (RAM). If the last byte in the stack is at
address
0xFF
in RAM, the Stack Pointer (CPU_SP or
SP
) will wrap to RAM address
0x00
. It is the
firmware developer’s responsibility to ensure that the stack does not overlap with user-defined vari-
ables in RAM.
As shown in
, the Flag register has 6 of 8 bits defined. The
PgMode
and
XIO
bits are used
to control the active register and RAM address spaces in the PSoC device. The C and Z bits are the
Carry and Zero flags respectively. These flags are affected by arithmetic, logical, and shift operations
provided in the M8C instruction. The GIE bit is the Global Interrupt Enable. When set, this bit allows
the M8C to be interrupted by the PSoC device’s interrupt controller.
Table 2-1. M8C Internal Flag (F) Register (CPU_F)
Bits
7
6
5
4
3
2
1
0
Name
PgMode[1:0]
XIO
C
Z
GIE
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 ...