Microsoft DirectX 8.0 (Visual Basic)

sub

Subtracts sources.

sub   tDest, tSrc0, tSrc1

Registers

tDest
Destination register, holding the result of the operation.
tSrc0
Source register, specifying the input argument.
tSrc1
Source register, specifying the input argument.

Remarks

This instruction performs the subtraction based on the following formula.

tDest = tSrc0 - tSrc1

The following example shows how this instruction might be used.

sub   r2, v2, r2    ; difference