SUBB
Operation: | SUBB |
Function: | Subtract from Accumulator With Borrow |
Syntax: | SUBB A,operand |
Instructions | OpCode | Bytes | Cycles | Flags |
SUBB A,#data | 0x94 | 2 | 1 | C, AC, OV |
SUBB A,iram addr | 0x95 | 2 | 1 | C, AC, OV |
SUBB A,@R0 | 0x96 | 1 | 1 | C, AC, OV |
SUBB A,@R1 | 0x97 | 1 | 1 | C, AC, OV |
SUBB A,R0 | 0x98 | 1 | 1 | C, AC, OV |
SUBB A,R1 | 0x99 | 1 | 1 | C, AC, OV |
SUBB A,R2 | 0x9A | 1 | 1 | C, AC, OV |
SUBB A,R3 | 0x9B | 1 | 1 | C, AC, OV |
SUBB A,R4 | 0x9C | 1 | 1 | C, AC, OV |
SUBB A,R5 | 0x9D | 1 | 1 | C, AC, OV |
SUBB A,R6 | 0x9E | 1 | 1 | C, AC, OV |
SUBB A,R7 | 0x9F | 1 | 1 | C, AC, OV |
Description: SUBB subtract the value of operand from the value of the Accumulator, leaving the resulting value in the Accumulator. The value operand is not affected.
The Carry Bit (C) is set if a borrow was required for bit 7, otherwise it is cleared. In other words, if the unsigned value being subtracted is greater than the Accumulator the Carry Flag is set.
The Auxillary Carry (AC) bit is set if a borrow was required for bit 3, otherwise it is cleared. In other words, the bit is set if the low nibble of the value being subtracted was greater than the low nibble of the Accumulator.
The Overflow (OV) bit is set if a borrow was required for bit 6 or for bit 7, but not both. In other words, the subtraction of two signed bytes resulted in a value outside the range of a signed byte (-128 to 127). Otherwise it is cleared.
User Comments
No Posts found !Login to Post a Comment.