Mostly!
LA works as long as the answer fits in 24 bits so it's no good for
adding 8 to a negative value in R1 for example.
An alternative solution is:
A R1,=F'8'
If memory is really tight, you could use this and possibly save two bytes:
AH R1,=H'8'
Regards,
Peter Coghlan.
toggle quoted message
Show quoted text
Yes!
LA R1,8(R1)
Joe
On Thu, Apr 16, 2020 at 1:09 PM adriansutherland67 <
adrian@...> wrote:
Is there a better way than this to add 8 to R1?
LA R0,8
AR R1,R0 Add 8 to R1
Thanks A