Datasheet

Bit 0 – C Carry Flag
The carry flag C indicates a carry in an arithmetic or logic operation. See the Instruction Set Description
for detailed information.
11.4 General Purpose Register File
The register file is optimized for the AVR Enhanced RISC instruction set. In order to achieve the required
performance and flexibility, the following input/output schemes are supported by the register file:
One 8-bit output operand and one 8-bit result input
Two 8-bit output operands and one 8-bit result input
Two 8-bit output operands and one 16-bit result input
One 16-bit output operand and one 16-bit result input
Figure 11-2. AVR CPU General Purpose Working Registers
7
0
R0
R1
R2
R13
General
R14
Purpose
R15
Working
R16
Registers
R17
R26
X-register Low Byte
R27
X-register High Byte
R28
Y-register Low Byte
R29
Y-register High Byte
R30
Z-register Low Byte
R31
Z-register High Byte
Most of the instructions operating on the register file have direct access to all registers, and most of them
are single cycle instructions. As shown in the figure, each register is also assigned a data memory
address, mapping them directly into the first 32 locations of the user data space. Although not being
physically implemented as SRAM locations, this memory organization provides great flexibility in access
of the registers, as the X-, Y-, and Z-pointer registers can be set to index any register in the file.
11.4.1 The X-register, Y-register, and Z-register
The registers R26...R31 have some added functions to their general purpose usage. These registers are
16-bit address pointers for indirect addressing of the data space. The three indirect address registers X,
Y, and Z are defined as described in the figure.
ATmega48PA/88PA/168PA
AVR CPU Core
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 32