SUBTRACT Examples
Example 1:
|
|
|
|
|
|
Variable |
|
Contents |
|
Before: |
SEND(N) |
3.1 |
•45.3 |
|
|
RECVING |
4.2 |
••55.65 |
|
| |||
|
After: |
SEND(N) |
3.1 |
•45.3 |
|
|
RECVING |
4.2 |
••10.35 |
No Condition Flag is set.
Example 2:
|
|
Variable |
|
Contents |
|
Before: |
SEND(N) |
4 |
•250 |
|
|
RECVING |
4.2 |
-825.33 |
|
| |||
|
After: |
SEND(N) |
4 |
•250 |
|
|
RECVING |
4.2 |
1075.33 |
The OVER Condition Flag is set. RECVING was too small to contain -1075.33. The LESS and ZERO Condition Flags are unpredictable.
Example 3:
|
|
|
|
|
|
|
|
|
|
|
|
|
•150.26 |
|
| |||
|
|
|
|
-199.75 |
The LESS Condition Flag is set. RECVING has a negative amount.
Example 4:
|
|
|
|
|
|
Variable |
|
Contents |
|
Before: |
SEND(N) |
3.1 |
•45.3 |
|
|
RECVING |
4.2 |
••55.65 |
|
|
OPTDEST |
4.2 |
••••.00 |
|
| |||
|
After: |
SEND(N) |
3.1 |
•45.3 |
|
|
RECVING |
4.2 |
••55.65 |
|
|
OPTDEST |
4.2 |
••10.35 |
No Condition Flag is set.
Example 5:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Performs a standard SUB instruction on each element within each array.
![]() |