Table 4–13. class 1 instruction encoding, Table 4–14. class 1a instruction description – Texas Instruments MSP50C614 User Manual
Page 118
Instruction Classification
4-26
Class 1a provides the four basic instructions of load, store, add, and subtract
between accumulator and data memory. Either the accumulator or the offset
accumulator (A~ bit dependent) can be stored in memory with the MOV
instruction. The MOV instruction can load the accumulator (or its offset)
depending on the ~A bit. The ADD or SUB instructions add or subtract memory
from an accumulator register and save the results in the accumulator register
(~A=0) or its offset (~A=1). Two of the four codes provided by the
next A field
will cause a pre–increment or a predecrement of the accumulator register
pointer (AP) prior to execution. This preincrement is a permanent change to
the referenced AP and further expands the use of the accumulator block as
an efficient workspace. Preincrements and predecrements are not available
in string mode
One of the four codes of the A
n field (An = 11 binary) will cause the instruction
to be treated as a multicycle string instruction. This will not result in any perma-
nent modification to the referenced AP.
Since there is no reference to offset accumulators in Class 1b instructions, the
execution operates on memory and accumulators. All other modes of control
(string, preincrement/predecrement AP, data memory addressing modes,
etc.) are provided for logical, byte, multiply-accumulate, and barrel shift
instructions.
Table 4–13. Class 1 Instruction Encoding
Bit
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Class 1a
0
0
C1a
~A~
next A
A
n
adrs
Class 1b
0
1
C1b
s
A
n
adrs
Table 4–14. Class 1a Instruction Description
C1a
Mnemonic
Description
0
0
ADD A
n[~], An, {adrs} [, next A]
ADDS A
n[~], An, {adrs}
Add contents of data memory location referred by {
adrs} to accumulator An
and store the results in the same accumulator A
n (if ~A=0) or offset
accumulator A
n~ (~A=1). ALU status is modified.
0
1
SUB A
n[~], An, {adrs} [, next A]
SUBS A
n[~], An, {adrs}
Subtract contents of data memory location referred by {
adrs} from
accumulator A
n and store the results in the same accumulator An (if ~A=0)
or offset accumulator A
n~ (~A=1). ALU status is modified.
1
0
MOV A
n[~], {adrs} [, next A]
MOVS A
n[~], {adrs}
Load accumulator A
n (~A=0) or offset accumulator An~ (~A=1) from data
memory location referred to {
adrs}. ALU status is modified.
1
1
MOV {
adrs}, An[~] [, next A]
MOVS {
adrs}, An[~]
Store accumulator (A~=0) or offset accumulator (A~=1) to data memory
location referred to by addressing mode {
adrs}. Transfer status is modified.