Datasheet

2018 Microchip Technology Inc. Data Sheet Complete DS40002060A-page 18
ATtiny4/5/9/10
Figure 5-2. AVR CPU General Purpose Working Registers
Note: A typical implementation of the AVR register file includes 32 general prupose registers but ATtiny4/5/9/10 implement only 16
registers. For reasons of compatibility the registers are numbered R16...R31, not R0...R15.
Most of the instructions operating on the Register File have direct access to all registers, and most of them are single cycle
instructions.
5.4.1 The X-register, Y-register, and Z-register
Registers R26..R31 have some added functions to their general purpose usage. These registers are 16-bit address point-
ers for indirect addressing of the data space. The three indirect address registers X, Y, and Z are defined as described in
Figure 5-3.
Figure 5-3. The X-, Y-, and Z-registers
In different addressing modes these address registers function as automatic increment and automatic decrement (see doc-
ument “AVR Instruction Set” and section “Instruction Set Summary” on page 159 for details).
70
R16
R17
General R18
Purpose
Working R26 X-register Low Byte
Registers 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
15 XH XL 0
X-register 707 0
R27 R26
15 YH YL 0
Y-register 707 0
R29 R28
15 ZH ZL 0
Z-register 707 0
R31 R30