| ??? 11/03/03 00:09 Read: times |
#57702 - RE: Comparing Registers Responding to: ???'s previous message |
Mike Adamson wrote:
------------------------------- Let's say Mode 1 sets a value of 250 and Mode 2 sets a value of 255. If I use your solution and subtract 250 from the current Mode 1 value of 250, the result is 0 and thus the Carry is set to 1, correct? , correct? Hi Mike, What I proposed actually gives you a < function rather than a <> or = function. Sorry. Anyway, why should the carry be set ? There has been no borrow. From the site tutorial 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. what you want is probably MOV A,P2 CLR C SUBB A, #250 JZ ...... Just sort our where and when you PUSH and POP Acc Hope this helps. Steve |
| Topic | Author | Date |
| Comparing Registers | 01/01/70 00:00 | |
| RE: Comparing Registers | 01/01/70 00:00 | |
| RE: Comparing Registers | 01/01/70 00:00 | |
| RE: Comparing Registers | 01/01/70 00:00 | |
| help | 01/01/70 00:00 | |
RE: help | 01/01/70 00:00 | |
| RE: Comparing Registers | 01/01/70 00:00 |



