rdlong between two waitpeqs
ionymous
Posts: 29
I am coding in assembly.
Over the weekend I found a bug in my assembly code that was killing me.
I've changed my code quite a bit since then, but the general idea is that I had a rdlong between two waitpeq.
Something like:
This was all in a loop and so my counter at the end was incrementing very quickly. I output it to a TV.
But the rdlong didn't seem to be working. someVar wasn't getting updated as I expected.
I then move the rdlong to after the second waitpeq, and it worked fine. Like this:
Is there something I'm not understanding here? Or must this be a side effect of some other part of my code?
Thanks for any help
Ion
Over the weekend I found a bug in my assembly code that was killing me.
I've changed my code quite a bit since then, but the general idea is that I had a rdlong between two waitpeq.
Something like:
waitpeq someBitMask2, someBitMask1 rdlong someVar, someAddress waitpeq someBitMask3, someBitMask1 add gotHereCount, %1
This was all in a loop and so my counter at the end was incrementing very quickly. I output it to a TV.
But the rdlong didn't seem to be working. someVar wasn't getting updated as I expected.
I then move the rdlong to after the second waitpeq, and it worked fine. Like this:
waitpeq someBitMask2, someBitMask1 waitpeq someBitMask3, someBitMask1 rdlong someVar, someAddress add gotHereCount, %1
Is there something I'm not understanding here? Or must this be a side effect of some other part of my code?
Thanks for any help
Ion
Comments
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Just a few PropSTICK Kit bare PCBs left!