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:          SUB {<cond>}{S} <destination>, <operand1>, <operand2>
Operation:     destination = operand one - operand two
Flags:          N,Z,C,V

This instruction performs the arithmetic subtraction of its second operand from its first operand, and stores the result in the destination register.

Examples:
SUB    R10,R2,R4     ; R10 = R2 - R4
SUBMI  R1,R3,#1024     ; If neg flag set R1 = R3 - 1024
SUB    R0,R0,R0,LSL#1     ; R0 = R0 - 2*R0 (R0 = -R0)

[sh-index] Back to list of manuals