English
Language : 

MA014B Datasheet, PDF (3/14 Pages) Megawin Technology Co., Ltd – Single chip 8-bit CPU
Function Description
Registers
A
Y
X
P
PCH
PCL
1
S
Accumulator
The accumulator is a general-purpose 8-bit register, which stores the results of most arithmetic and
logic operations. In addition, the accumulator usually contains one of two data words, which are
used in these operations.
Index Register (X, Y)
There are two 8-bit index registers (X and Y), which may be used to count program steps or to
provide an index value to be used in generating an effective address. When executing an
instruction, which specifies indexed addressing, the CPU fetches the OP Code and the base
address, and modifies the address by adding the index register to it prior to performing the desired
operation. Pre- or post-index of index address is possible.
Processor Status Register (P)
The 8-bit processor status register contains seven status flags. Some of the flags are controlled by
the program, others may be controlled both the program and the CPU.
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
N
V
1
B
D
N: Signed flag, 1 = negative, 0 = positive
V: Overflow flag, 1 = true, 0 = false
B: BRK interrupt command, 1 = BRK, 0 = IRQB
D: Decimal mode, 1 = true, 0 = false
I: IRQB disable flag, 1 = disable, 0 = enable
Z: Zero flag, 1 = true, 0 = false
C: Carry flag, 1 = true, 0 = false
Bit 2
I
Bit 1
Z
Bit 0
C
Program Counter (PC)
The 16-bit program counter register provides the addresses, which step the micro-controller
through sequential program instructions. Each time the micro-controller fetches an instruction from
program memory, the lower byte of the program counter (PCL) is placed on the low-order 8 bits of
the address bus and the higher byte of the program counter (PCH) is placed on the high-order 8
bits. The counter is incremented each time an instruction or data is fetched from program memory.
Stack Pointer (S)
The stack pointer is an 8-bit register, which is used to control the addressing of the variable-length
stack. The stack pointer is automatically incremented and decremented under control of the micro-
controller to perform stack manipulations under direction of either the program or interrupts (/IRQ).
The stack allows simple implementation of nested subroutines and multiple level interrupts. The
stack pointer is initialized by the user’s software.
MEGAWIN
MA014B Series Technical Summary
3