| ??? 03/20/03 15:35 Read: times |
#41972 - RE: Is the accumulator bit addressable Responding to: ???'s previous message |
Sometimes it is nice to make code that is straight-line without a extra jumps in it. Here is another way to compare bits 3 & 5 of the accumulator to determine if the two bits match using straight-line code. Clearly not "more efficient" than other examples given this does show how bit level computations are done. This implements the concept given bit a an bit b that:
a xor b = (a and /b) or (/a and b) ....and of course most know that (a xor b) = 0 if (a == b) org 030h mov a, 50h ;as example using data at addr 50h mov c, acc.5 anl c, /acc.3 mov psw.1, c mov c, acc.3 anl c, /acc.5 orl c, psw.1 jc mismatch ;go to deal with mismatch condition match: .... code here for match .... mismatch: .... code here for no match .... Michael Karas |
| Topic | Author | Date |
| Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
| RE: Is the accumulator bit addressable | 01/01/70 00:00 | |
RE: Embedded C Programmers | 01/01/70 00:00 |



