![background image](http://html1.mh-extra.com/html/texas-instruments/msp50c6xx/msp50c6xx_user-manual_1097068263.webp)
Individual Instruction Descriptions
4-177
Assembly Language Instructions
Syntax
Description
SUB An[~], An, {adrs} [, next A]
Subtract effective data memory word from An[~], store result in An
SUB An[~], An[~], imm16 [, next A]
Subtract immediate word from An[~], store result in An[~]
SUB An[~], An[~], PH [, next A]
Subtract Product High (PH) register from An[~], store result in An[~]
SUB An[~], An, An~ [, next A]
Subtract An~ word from An word, store result in An[~]
SUB An[~], An~, An [, next A]
Subtract An word from An~ word, store result in An[~]
SUB Rx, imm16
Subtract immediate word from Rx
SUB Rx, R5
Subtract R5 from Rx
See Also
SUBB, SUBS, ADD, ADDB, ADDS
Example 4.14.80.1
SUB A1, A1, 74
Subtract 74 (decimal) immediate from accumulator A1, put result in accumulator A1.
Example 4.14.80.2
SUB A0, A0, 2, ++A
Pre–increment pointer AP0, subtract 2 from new accumulator A0, put result in accumulator A0.
Example 4.14.80.3
SUB A1, A1~, A1
Subtract accumulator A1 from accumulator A1~, put result in accumulator A1.
Example 4.14.80.4
SUB A1, A1, A1~, ––A
Pre–decrement AP1. Subtract accumulator A1~ from accumulator A1, put result in accumulator A1.
Example 4.14.80.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.80.6
SUB R3, R5
Subtract R5 from R3, put result in R3.
Summary of Contents for MSP50C6xx
Page 6: ...vi...
Page 14: ...xiv...
Page 24: ...1 10...
Page 296: ...Instruction Set Summay 4 210 Assembly Language Instructions...
Page 366: ...6 12...