Previous Topic

Next Topic

Book Contents

Book Index

SUB [D>=23]

Binary 8-bit subtraction of X from Y. Pops the operands off the stack, leaves the result in X. If the subtraction produces a borrow, sets the carry flag.

The R register does double duty as result flags for binary arithmetic instructions.

From dialect 23 bit 0 of R is the carry flag. A carry out of an ADD, ADC, SUB or SBC instruction will set bit 0 of R.

The same bit 0 the acts as the carry input to ADC and SBC.

See also ADD, ADC, SBC, RtoX

Previous Topic

Next Topic