x86 Assembly Language Reference Manual

Subtraction Instructions

Subtract Real and Pop (fsub)

fsub{ls}
Example

Subtract stack element 7 from stack element 0 and return the difference to stack element 0.

fsub %st(7), %st

Subtract Real (fsubp)

fsubp
Example

Subtract stack element 7 from stack element 0 and return the difference to stack element 7, then pop the stack.

fsubp %st, %st(7)

Subtract Real Reversed (fsubr)

fsubr{ls}
Example

Subtract stack element 0 from stack element 7 and return the difference to stack element 0.

fsubr %st(7), %st

Subtract Real Reversed and Pop (fsubrp)

fsubrp
Example

Subtract stack element 0 from stack element 7 and return the difference to stack element 7, then pop the stack.

fsubrp %st, %st(7)

Integer Subtract (fisubrp)

fisubrp
Example

Subtract stack element 0 from the integer contents of register ECX (with an offset of 2) and return the difference to register ECX, then pop the stack.

fisubrp 2(%ecx)

Integer Subtract Reverse (fisubr)

fisubr{l}
Example

Subtract stack element 0 from the integer contents of register ECX (with an offset of 2) and return the difference to stack element 0.

fisubr 2(%ecx)