unsigned int i; i--; is compiled as LDR SUBS STR is there any sort of INC / DEC command to do this in one instruction on the ARM like on other processors? matt
SUBS is equivalent to a decrement instruction. LDR and STR are only required if your variable resides in memory and it is not allocated into a register.
So: yes, it has increment/decrement instructions but it is not capable to increment/decrement variables in memory (like most other RISCs, it is a load/store machine). regards, Giovanni --- ChibiOS/RT