??? 06/19/04 06:38 Read: times Msg Score: +2 +2 Good Answer/Helpful |
#72777 - RE: R5 & R7: ? Responding to: ???'s previous message |
So I make a change to the register using: replace R7 with R5, and the program works fine. Why is there a difference? We'd have to see the source code for the "DELAY" routine, but I'd be willing to bet that DELAY uses the R7 register to cause the delay. R7 is being used in the above code, it gets modified in DELAY, and when it comes back R7 no longer holds the same value as it contained when DELAY was called. If DELAY uses R7 you can either push R7 onto the stack at the beginning of DELAY and pop it off the stack before you return, or you can just avoid using R7 in the main program. Regards, Craig Steiner |
Topic | Author | Date |
R5 & R7: ? | 01/01/70 00:00 | |
RE: R5 & R7: ? | 01/01/70 00:00 | |
RE: R5 & R7: ? | 01/01/70 00:00 | |
Solved! | 01/01/70 00:00 | |
RE: R5 & R7: ? | 01/01/70 00:00 | |
RE: R5 & R7: ? | 01/01/70 00:00 | |
RE: R5 & R7: ?![]() | 01/01/70 00:00 |