Individual Instruction Descriptions
4-180
Syntax Description
SUBS An[~], An, {adrs} Subtract data memory string from An string, store result in An[~] string
SUBS An[~], An[~], pma16 Subtract program memory string from An[~] string, store result in An[~] string
SUBS An[~], An, An~ Subtract An~ string from An string, store result in An[~] string
SUBS An[~], An~, An Subtract An string from An~ string, store result in An[~] string
SUBS An[~], An[~], PH Subtract product high (PH) register from An[~] string mode. This instruction ig-
nores the string count, executing only once but maintains the CF and ZF status of
the previous multiply or shift operation as if the sequence was a single string. Word
alignment with PH is maintained, i.e., PH is subtracted from the second word of the
string. Also, only the second word is copied to the destination string.
Example 4.14.82.1 SUBS A0, A0~, *R2++
Subtract data memory string beginning at address in R2 from accumulator string A0~, put result in
accumulator string A0 then increment R2 by 2.
Example 4.14.82.2 SUBS A1~, A1, 0x1220
Subtract program memory string at address 0x1220 from accumulator string A1, put result in
accumulator string A1~.
Example 4.14.82.3 SUBS A2, A2, A2~
Subtract accumulator string A2~ from accumulator string A2, put result in accumulator string A2.
Example 4.14.82.4 SUBS A2, A2~, A2
Subtract accumulator string A2 from accumulator string A2~, put result in accumulator string A2.
Example 4.14.82.5 SUBS A3~, A3~, PH
Subtract PH from accumulator string A3~, put result in accumulator string A3. This instruction ignores
the string count.