Sign in to follow this  
Followers 0
dedshaw1612

Pointer Manipulation in Proworx32

2 posts in this topic

I had a question regarding the ability to do pointer manipulation. Attached is a snippet of my code that i am attempting to use but it doesn't seem to work. If you look at the picture, after i find some number i want to log, i search through the 96 register block starting at 402184 (402183 is the PTR) for a register that contains a 0. (400131 points to a zero register that is constant) If it does, I attempt to save the location of the zero by block moving the location into 402183, and initiate a copy instruction from the source table 402107 into the 96 register block. This is my algorithm for trying to keep data i am interested in without having to do any sorting. If i log it, i look for a zero and copy it. Later on i do the opposite when i am done with the data i look for that data in the register and copy 0 into it. The only issue is it doesn't seem to care about the block move into the 402183 pointer. The register to table instruction only follows the binary input i feed it. So when the control input goes on for top and middle, it only copies new information into the same register and the pointer never increases. If i only use the top input it copies the information and increases the pointer. Somehow it seems like it doesn't care what value i block move into 402183, it always remembers where it left off. Any ideas what i am doing wrong or if this is even possible? Thanks

Share this post


Link to post
Share on other sites
I think i figured out what was wrong. I'm still testing but it seems the SRCH function returns an off by 1 value. If i subtract 1 from the value it returns my logic seems to be working correctly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0