OkiePC
Lifetime Supporting Member
What is the best method to remove the first single character from a ST element in a SLC500?
I have a method that works but is ugly, and was wondering if someone out there may have a better idea.
Currently, I copy the string to an integer file, then I use a SWP on those integers to swap the high and low bytes of each one. Then I have eight BSR instructions (in a loop) to shift everything over one character, then another SWP to get the bytes back in order, before copying the integers back into the ST element. Then I have to correct the LEN portion of the element, since it gets blown away in the process.
Yes it is ugly, and I am hopeful there is a better way...
Thanks in advance,
Paul
I have a method that works but is ugly, and was wondering if someone out there may have a better idea.
Currently, I copy the string to an integer file, then I use a SWP on those integers to swap the high and low bytes of each one. Then I have eight BSR instructions (in a loop) to shift everything over one character, then another SWP to get the bytes back in order, before copying the integers back into the ST element. Then I have to correct the LEN portion of the element, since it gets blown away in the process.
Yes it is ugly, and I am hopeful there is a better way...
Thanks in advance,
Paul