| ??? 01/14/00 00:01 Read: times |
#1215 - RE: How to do comparsion? |
1st method: use the instruction
CJNE A,addr,label continue ... label: check carry flag (JC , JNC ) ..... if the value in A is equal to value in addr then continue else go to label and check the CY if the value in A is less than the value in addr then CY=1. ____________ 2nd method : Use SUBB SUBB A,R1 JZ equal (if A=0 go to equal) JC A_less_R1 (if CY=1 A<R1) ..... .... .... equal: .... A_less_R1:..... build the source code (it is only some bytes ) and try it with a simulator Good luck ..B.X |
| Topic | Author | Date |
| How to do comparsion? | 01/01/70 00:00 | |
RE: How to do comparsion? | 01/01/70 00:00 |



