SUB: Subtract:- The subtract instruction subtracts the source operand from destination operand and result is left in the destination operand. Source operand might be memory location, register or immediate data and the destination operand might be a or a memory location or register, but destination and source operands both might not be memory operands. Destination operand cannot be an immediate data. By this instruction, all the condition code flags are affected. The instance of this instruction along with the addressing modes is followed below:
Example :
1. SUB 0100H Immediate [destination AX]
2. SUB AX, BX Register
3. SUB AX, [5000H] Direct
4. SUB [5000H], 0100 Immediate