stmdb means decrement to and then use this address to start writing to the stack, this is correct. ldmia means incrementing after that, starting with the current stack pointer, to read the values ββback into their registers, and then increment the stack pointer. The fd nomenclature never made sense to me. Like a jump, if it is equal and jumps, if zero is the same instruction for all processors, and some asms offer both, there are only two options: ldm and stm db, ia, fd, all cards in these two flavors. Itβs easier for me to remember the increment after (ldmia) and the decrement before (ldmdb). Or, if for some reason you turn the load / storage direction bit, you still choose the right step before or after, depending on what you are trying to do.
In C, it's like * (ptr ++) vs * (++ ptr)
source share