Read Modify Write Operations
Read Modify Write Operations
The accumulator (ACC) is the main working register for the C28x. It is the destination of all
ALU operations except those, which operate directly on memory or registers. The accumulator
supports single-cycle move, add, subtract and compare operations from 32-bit-wide data memory.
It can also accept the 32-bit result of a multiplication operation. These one or two cycle
operations are referred to as read-modify-write operations, or as atomic instructions.
Read-Modify-Write Instructions
AND loc16,#16b
OR loc16,#16b
XOR loc16,#16b
ADD loc16,#16b
SUBR loc16,#16b
AND loc16,AX
OR loc16,AX
XOR loc16,AX
ADD loc16,AX
SUB loc16,AX
SUBR loc16,AX
INC loc16
DEC loc16
TSET loc16,#bit
TCLR loc16,#bit
AH,
AL
16- bit
constant
Work directly on memory
Work directly on memory
–
–
bypass ACC
bypass ACC
Atomic Operations
Atomic Operations
–
–
protected from interrupts
protected from interrupts
C - 18 C28x - Appendix C - Assembly Programming