This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:multiasm:piot:chapter_4_3 [2026/01/19 10:52] – marcin | en:multiasm:piot:chapter_4_3 [2026/01/19 15:08] (current) – marcin | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| **R16-R31: | **R16-R31: | ||
| General-purpose registers that can be used with immediate | General-purpose registers that can be used with immediate | ||
| + | |||
| + | Comparison Table: AVR Registers R0–R15 vs. R16–R31 | ||
| + | |||
| + | ^ Feature | ||
| + | | Instruction compatibility | ||
| + | | Opcode encoding | ||
| + | | Typical compiler usage | Less preferred; used for temporary or special roles | ||
| + | | Special-purpose roles | ||
| + | | Pointer support | ||
| + | | Efficiency | ||
| + | | Multiplication involvement | ||
| + | | Suitability in ASM | Limited; avoid with immediates; R0/R1 have special rules | Recommended for general ALU operations | ||
| + | | GCC policy | ||
| <figure avr_registers> | <figure avr_registers> | ||
| - | {{en: | + | {{en: |
| < | < | ||
| </ | </ | ||
| Line 22: | Line 35: | ||
| <figure avr_registers> | <figure avr_registers> | ||
| - | {{en: | + | {{en: |
| < | < | ||
| </ | </ | ||
| Line 35: | Line 48: | ||
| <table Register properties> | <table Register properties> | ||
| < | < | ||
| - | ^ Register ^ Purpose ^ Combined With ^ Enables ^ | + | ^ Register |
| - | | RAMPX | Extends data addressing | X register | Access to data above 64 KB using X | | + | | RAMPX |
| - | | RAMPY | Extends data addressing | Y register | Access to data above 64 KB using Y | | + | | RAMPY |
| - | | RAMPZ | Extends data and program addressing |Z register| Access to data and constants above 64 KB using Z | | + | | RAMPZ |
| - | | RAMPD | Extends data addressing | Z register | Direct access to data above 64 KB | | + | | RAMPD |
| - | | EIND | Extends program addressing | Z register | Jumps and calls to program memory above 128 KB | | + | | EIND | Extends program addressing |
| </ | </ | ||