SUBtract with eXtend
NAME
SUBX -- Subtract with extend
SYNOPSIS
SUBX Dy,Dx
SUBX -(Ay),-(Ax)
Size = (Byte, Word, Long)
FUNCTION
Subtracts the source operand to the destination operand along with
the extend bit, and stores the result in the destination location.
The subtraction is performed using binary coded decimal arithmetic.
The operands, which are packed BCD numbers, can be addressed in two
different ways:
1. Data register to data register: The operands are contained in the
data registers specified in the instruction.
2. Memory to memory: The operands are addressed with the predecrement
addressing mode using the address registers specified in the
instruction.
The size of operation can be specified as byte, word, or long.
Normally the Z condition code bit is set via programming before the
start of an operation. That allows successful tests for zero results
upon completion of multiple-precision operations.
FORMAT
-----------------------------------------------------------------
|15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|-----------|---|-------|---|---|---|-----------|
| 1 | 0 | 0 | 1 | Rx | 1 | SIZE | 0 | 0 |R/M| Ry |
-----------------------------------------------------------------
R/M = 0 -> data register
R/M = 1 -> address register
Rx: destination register
Ry: source register
SIZE
00->one Byte operation
01->one Word operation
10->one Long operation
RESULT
X - Set the same as the carry bit.
N - Set if the result is negative. Cleared otherwise.
Z - Cleared if the result is non-zero. Unchanged otherwise.
V - Set if an overflow is generated. Cleared otherwise.
C - Set if a carry is generated. Cleared otherwise.
SEE ALSO
ADD ADDI
SUB SUBI ADDX
HTML Conversion by AG2HTML.pl V2.941126c, perl $RCSfile: subx.HTML,v $$Revision: 1.1 $$Date: 1999/09/14 21:14:12 $
Patch level: 36
& witbrock@cs.cmu.edu