AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Syntax:          SBC {<cond>}{S} <destination>, <operand1>, <operand2>
Operation:     destination = operand one - operand two - not (carry)
Flags:          N,Z,C,V

This operation allows multi-word subtraction to be performed in the same way that ADC allows multi-word addition. This time the carry flag is used to indicate that a "borrow" occured when subtracting two words.

SBC can be used for multi-word subtractions as follows:
SUBS  result_low, low1, low2     ; Subtract low words
SBCS  result_high, high1, high2     ; Subtract high words + carry
The S suffix is used to allow the subtract instructions to affect the carry flag.

[sh-index] Back to list of manuals