Instruction Set Description
256
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
CPUX
4.6.4.1
ADDA
ADDA
Add 20-bit source to a 20-bit destination register
Syntax
ADDA Rsrc,Rdst
ADDA #imm20,Rdst
Operation
src + Rdst
→
Rdst
Description
The 20-bit source operand is added to the 20-bit destination CPU register. The previous
contents of the destination are lost. The source operand is not affected.
Status Bits
N:
Set if result is negative (Rdst.19 = 1), reset if positive (Rdst.19 = 0)
Z:
Set if result is zero, reset otherwise
C:
Set if there is a carry from the 20-bit result, reset otherwise
V:
Set if the result of 2 positive operands is negative, or if the result of 2 negative
numbers is positive, reset otherwise
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
R5 is increased by 0A4320h. The jump to TONI is performed if a carry occurs.
ADDA
#0A4320h,R5
; Add A4320h to 20-bit R5
JC
TONI
; Jump on carry
...
; No carry occurred