SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 27
Version 1.0
ACCUMULATOR
The ACC is an 8-bit data register responsible for transferring or manipulating data between ALU and data memory. If
the result of operation is zero (Z) or carry (C or DC) occurs, then these flags will set to PFLAG register.
ACC is not in data memory (RAM), so ACC can’t be access by “B0MOV” instruction during the instant addressing
mode.
Example: Read and write ACC value.
; Read ACC data and store in BUF data memory
MOV
BUF,
A
.
.
; Write a immediate data into ACC
MOV
A,
#0FH
.
.
; Write ACC data from BUF data memory
MOV
A,
BUF
.
.
PUSH and POP instructions don’t store ACC value as any interrupt service executed. ACC must be stored in another
data memory defined by users. Once interrupt occurs, these data must be stored in the data memory based on the
user’s program as follows.
Note: ”PUSH”, “POP” instructions only process 0x80~0x87 working registers and PFLAG register. Users
have to save and load ACC by program as interrupt occurrence.
Example: Protect ACC and working registers.
ACCBUF
EQU
00H
; ACCBUF is ACC data buffer in bank 0.
INT_SERVICE:
B0XCH A, ACCBUF ; Store ACC value
PUSH. .
; Push instruction
.
.
.
.
POP
; Pop instruction
B0XCH A, ACCBUF ; Re-load ACC
RETI
; Exit interrupt service vector
Notice: To save and re-load ACC data must be used “B0XCH” instruction, or the PFLAG value maybe
modified by ACC.