Add numbers in AVR assembly
问题 How can I do this in AVR assembly? I have 2 numbers (Little endian) in different reg. # Number 1 LDI R16 0x… LDI R17 0x… LDI R18 0x… LDI R19 0x… # Number 2 LDI R20 0x… LDI R21 0x… LDI R22 0x… LDI R23 0x… I want to add them together and save the result to R20 - R23. 回答1: Regarding the "math" behind it: It's just the same as in the decimal system: When adding two single digit numbers, two cases have to be considered. Either the sum of the two is a new single digit number (5+4 = 9), or an