pabeader
Jan 6 2007, 10:23 AM
Hi ALL!!!
I have tried a number of different ways to do this.
AB 1100
ST15 is the String datafile :)
N7:6 is my index holder...
Is there a way to compare ST15:0 to ST15:[N7:6]
I know that I need to use the ASR instruction. It is very explicit in saying that you can use direct addressing only. So how do I get the String from ST15:[N7:6] to ST15:1 so that I can use
ASR
ST15:0
ST15:1
I've tried COP, MOV, sacrifice chicken... nothing works! I usually get it to verify fine but then faults the PLC at runtime.
Any help would be great!!!
pabeader
OkiePC
Jan 6 2007, 02:52 PM
I think this came up before and we found out (the hard way) that the 1100 won't allow ANY indexed manipulation of ST files. You can't MOV it for the ASR if you try to use indexed addressing. Depending on the range of the index, you may be able to create subroutines for each possible index and call the subroutine based on the index...very crude, but it may be your only hope...
pabeader
Jan 7 2007, 10:17 AM
I'm at home but I have a thought...
Since we know the length, ST15:[N7:6].LEN
And I can do this,
COP
ST15:[N7:6].DATA([N7:7])
ST15:0[N7:6].DATA([N7:7])
Then increment N7:7 and JMP back up...
Hmmmmm
I think that might work.
The worst thing is. Shortly after posting the question I realized that my 'string' was only going to be numbers. So I just switched to 'float' and POOF no more problem.
Thanks for the info.
pabeader
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.