add and adds
some questions about assembler:
- I want to add a signed 8-bit in xx into an unsigned 16bit in cPC. (There will be no overflow of the unsigned 16.bit result)
At the moment I have:
signx xx,#7 add cPC,xx
Is this correct?
I don't understand the difference between add and adds? I always thought that 2s complement takes care of everything.
- Is there a faster way to set a register value depending from a flag?
testbn r3,a wz if_nz mov b,#1 if_z mov b,#0
cmp r2,#1 wz mov xx,#0 if_z mov xx,#1
Thanks for any hints!