??? 10/19/05 05:04 Read: times |
#102597 - CJNE clarrification |
Recently it was pointed out to me that CJNE can be used to compare to values, and sets the C bit if the first is less than the second.
I'm looking here in my 8051 book, and it says : CJNE R2, #37, Label < Jump to "Label" if R2 !=37 Ever since I started I thought this meant jump to label is R2 was equal to 37. Now I'm finding out it means jump to "label" if R2 does NOT equal 37. No wonder nothing I write ever works. :-| So, the questions : 1. In the above example, assuming R2 was equal to 37, it would simply go to the next line? 2. Again, above example, if R2 was = to 20, it would jump to label, and in sub "label" I could use a JC LABEL2 to jump to label2, since the carry bit was set? 3. Can the label be "left off" as to just compare the two values? (IE: could I just CJNE R2, #37 and on the next line use a JC to jump if the carry bit was set?) Sorry everyone, another Eureka moment from someone who did too many drugs as a teenager. |
Topic | Author | Date |
CJNE clarrification | 01/01/70 00:00 | |
Please find my answer below each quest | 01/01/70 00:00 | |
cjne | 01/01/70 00:00 | |
continued.. | 01/01/70 00:00 | |
external memory | 01/01/70 00:00 | |
Absolutely! | 01/01/70 00:00 | |
cheat.... | 01/01/70 00:00 | |
Hint | 01/01/70 00:00 | |
you young whippersnappers | 01/01/70 00:00 | |
Young Whippersnappers tools | 01/01/70 00:00 | |
size & information | 01/01/70 00:00 | |
CJNE macros | 01/01/70 00:00 | |
More CJNE | 01/01/70 00:00 | |
PRE tags![]() | 01/01/70 00:00 | |
Whatever made you think that?? | 01/01/70 00:00 | |
used to other language | 01/01/70 00:00 | |
CJD | 01/01/70 00:00 | |
welllll... | 01/01/70 00:00 | |
most admirable, but | 01/01/70 00:00 | |
Don't guess! | 01/01/70 00:00 | |
which many that could not be bothered to | 01/01/70 00:00 | |
Value testing | 01/01/70 00:00 | |
Confusing for bigineer | 01/01/70 00:00 | |
Just apply it | 01/01/70 00:00 | |
what more then "the bibl" do you need | 01/01/70 00:00 |