Instruction Formats
Instruction Formats
Instruction Formats
Instruction Formats
What is a “REG”?
What is a “REG”?
16
16
-
-
bit Access = AR0 through AR7, AH, AL, PH, PL, T and SP
bit Access = AR0 through AR7, AH, AL, PH, PL, T and SP
32
32
-
-
bit Access = XAR0 through XAR7, ACC, P, XT
bit Access = XAR0 through XAR7, ACC, P, XT
What is an “#
What is an “#
imm
imm
”?
”?
an immediate constant stored in the instruction
an immediate constant stored in the instruction
What is a “
What is a “
mem
mem
”?
”?
A directly or indirectly addressed operand from data memory
A directly or indirectly addressed operand from data memory
Or, one of the registers from “REG”!
Or, one of the registers from “REG”!
loc16 or loc32 (for 16
loc16 or loc32 (for 16
-
-
bit or 32
bit or 32
-
-
bit data access)
bit data access)
INSTR
INSTR
REG
REG
NEG
NEG
AL
AL
INSTR
INSTR
REG,#
REG,#
imm
imm
MOV
MOV
ACC,#1
ACC,#1
INSTR
INSTR
REG,
REG,
mem
mem
ADD
ADD
AL,@x
AL,@x
INSTR
INSTR
mem
mem
,REG
,REG
SUB
SUB
AL,@AR0
AL,@AR0
INSTR
INSTR
mem
mem
,#
,#
imm
imm
MOV
MOV
*XAR0++,#25
*XAR0++,#25
INSTR
INSTR
dst
dst
,
,
src
src
Example
Example
The C28x follows a convention that uses instruction, destination, then source operand order
(INSTR dst, src). Several general formats exist to allow modification of memory or registers
based on constants, memory, or register inputs. Different modes are identifiable by their leading
characters (# for immediate, * for indirect, and @ for direct). Note that registers or data memory
can be selected as a ‘mem’ value.
C28x - Appendix B - Addressing Modes B - 5