Texas Instruments MSP50C614 User Manual
Page 267
Individual Instruction Descriptions
4-175
Assembly Language Instructions
Syntax
Description
SUB A
n[~], An, {adrs} [, next A]
Subtract effective data memory word from A
n[~], store result in An
SUB A
n[~], An[~], imm16 [, next A]
Subtract immediate word from A
n[~], store result in An[~]
SUB A
n[~], An[~], PH [, next A]
Subtract Product High (PH) register from A
n[~], store result in An[~]
SUB A
n[~], An, An~ [, next A]
Subtract A
n~ word from An word, store result in An[~]
SUB A
n[~], An~, An [, next A]
Subtract A
n word from An~ word, store result in An[~]
SUB R
x, imm16
Subtract immediate word from R
x
SUB R
x, R5
Subtract R5 from R
x
See Also
SUBB, SUBS, ADD, ADDB, ADDS
Example 4.14.79.1
SUB A1, A1, 74
Subtract 74 (decimal) immediate from accumulator A1, put result in accumulator A1.
Example 4.14.79.2
SUB A0, A0, 2, ++A
Pre–increment pointer AP0, subtract 2 from new accumulator A0, put result in accumulator A0.
Example 4.14.79.3
SUB A1, A1~, A1
Subtract accumulator A1 from accumulator A1~, put result in accumulator A1.
Example 4.14.79.4
SUB A1, A1, A1~, ––A
Pre–decrement AP1. Subtract accumulator A1~ from accumulator A1, put result in accumulator A1.
Example 4.14.79.5
SUB A3~, A3, *R4—
Subtract word at address in R4 from A3, store result in A3~, decrement value in R4 by 2 (word mode)
after the subtraction.
Example 4.14.79.6
SUB R3, R5
Subtract R5 from R3, put result in R3.