From cc00e6fa56ef3fb58f7695f12d12497ad93f884e Mon Sep 17 00:00:00 2001 From: pkivolowitz Date: Fri, 23 Dec 2022 09:53:10 -0600 Subject: [PATCH] clarified pre and post increment ++ suggests a value of 1 - clarified that values can be other than 1. --- section_1/regs/ldr.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/section_1/regs/ldr.md b/section_1/regs/ldr.md index 3455ed3..9fceeed 100644 --- a/section_1/regs/ldr.md +++ b/section_1/regs/ldr.md @@ -56,6 +56,10 @@ Assume `ptr` is a pointer to a `long`: * Line 2 corresponds to: `*(ptr++)`. * Line 3 corresponds to: `*(++ptr)`. +Note this is for illustration only in that the `++` syntax in C and C++ increment by 1. In lines 2 and 3, `#simm` can have values other than 1 including negative values for decrements. + +Also note that when used with the stack pointer `sp`, `#simm` must be a multiple of 16. + Concerning the restrictions placed on the offsets: * `simm` can be in the range of -256 to 255 (10 byte signed value).