??? 06/27/08 07:03 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#156240 - the common misconception of people... Responding to: ???'s previous message |
... coming to '51 is, that every operation must be performed on accumulator.
The '51 has a very weird instruction set, I would say "non-orthogonal" if I would know what does that exactly mean... ;-) If you want to check a REGISTER for zero, simply use CJNE Ri,#0,jumpaddress. Note that CJNE modifies the carry bit! You might also use XCH A,Ri + JZ/JNZ, that does not affect carry, but then you have to perform the same XCH in both branches (if both ACC and Ri content needed in both). Finally, the dirtiest of dirties, INC Ri + DJNZ Ri,jumpaddress provides a test without affecting carry and ACC and Ri. JW |
Topic | Author | Date |
check for zero code options? | 01/01/70 00:00 | |
Like this? | 01/01/70 00:00 | |
the common misconception of people... | 01/01/70 00:00 | |
Question | 01/01/70 00:00 | |
Precious stack | 01/01/70 00:00 | |
not just stack/IRAM-wise is it better,... | 01/01/70 00:00 | |
Ah. I see. | 01/01/70 00:00 | |
note "bible definition" Ri/Rn | 01/01/70 00:00 | |
I do this Ri/Rn all the time![]() | 01/01/70 00:00 | |
modified carry bit | 01/01/70 00:00 | |
Free your development process | 01/01/70 00:00 | |
Interesting analogy | 01/01/70 00:00 | |
Thanks, good advice | 01/01/70 00:00 |