English
Language : 

UPSD3422_06 Datasheet, PDF (29/293 Pages) STMicroelectronics – Turbo Plus Series Fast Turbo 8032 MCU with USB and Programmable Logic
uPSD34xx
8032 MCU registers
the B Register to hold 16-bit operands. The ACC is referred to as “A” in the MCU instruction
set.
7.5
B register (B)
The B Register is a general purpose 8-bit register for temporary data storage and also used
as a 16-bit register when concatenated with the ACC Register for use with MUL and DIV
instructions.
7.6
General purpose registers (R0 - R7)
There are four banks of eight general purpose 8-bit registers (R0 - R7), but only one bank of
eight registers is active at any given time depending on the setting in the PSW word
(described next). R0 - R7 are generally used to assist in manipulating values and moving
data from one memory location to another. These register banks physically reside in the first
32 locations of 8032 internal DATA SRAM, starting at address 00h. At reset, only the first
bank of eight registers is active (addresses 00h to 07h), and the stack begins at address
08h.
7.7
7.7.1
7.7.2
7.7.3
7.7.4
7.7.5
Program status word (PSW)
The PSW is an 8-bit register which stores several important bits, or flags, that are set and
cleared by many 8032 instructions, reflecting the current state of the MCU core. Figure 12
on page 30 shows the individual flags.
Carry flag (CY)
This flag is set when the last arithmetic operation that was executed results in a carry
(addition) or borrow (subtraction). It is cleared by all other arithmetic operations. The CY flag
is also affected by Shift and Rotate Instructions.
Auxiliary carry flag (AC)
This flag is set when the last arithmetic operation that was executed results in a carry into
(addition) or borrow from (subtraction) the high-order nibble. It is cleared by all other
arithmetic operations.
General purpose flag (F0)
This is a bit-addressable, general-purpose flag for use under software control.
Register bank select flags (RS1, RS0)
These bits select which bank of eight registers is used during R0 - R7 register accesses
(see Table 4)
Overflow flag (OV)
The OV flag is set when: an ADD, ADDC, or SUBB instruction causes a sign change; a MUL
instruction results in an overflow (result greater than 255); a DIV instruction causes a divide-
29/293