clarified pre and post increment

++ suggests a value of 1 - clarified that values can be other than 1.
This commit is contained in:
pkivolowitz 2022-12-23 09:53:10 -06:00 committed by GitHub
parent 69475f29c5
commit cc00e6fa56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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).