| ??? 06/27/08 16:01 Read: times |
#156267 - note "bible definition" Ri/Rn Responding to: ???'s previous message |
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.
Ri is NOT any register it is only R0 or R1 Rn is R0 - R7 Jan mistyped, Ri in the above should be Rn in all cases. Erik |
| 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 |



