Ah, you are looking for EOLs and whatnot? CPIR is definitely faster. To seek the end of a line all you would need to do is ld a,3Fh \ cpir. I am currently rewriting my search routine for a speed boost and to shed some size, too. You can similarly look for the starting byte of your search string and then check the bytes following. (That is what my rewrite looks like, anyway)
The only shitty thing is that once the matching byte has been found using CPIR, you also have to check the previous byte to be sure it's not part of a word token.
For example, $3F can also be the second half of a TVARSYS, T2BYTETOK, or T2BYTETOK2 token.
That additionnal check adds a little bit of time & space but is the way to go if you wanna ensure maximum compatibility (and avoid bad surprises).
An alternative method is to entirely forbid word tokens :
For each prgm that you intend to read, you first scan it entirely for word toks, and then return some kind of compatibility error if one was found.
Of course, that must be done only once for each prgm.
After that, you're free to use CPIR alone to find your shit.
Also, I now want to see if it would be easier to load pages into port 7... I just load the code into RAM (like TempSwapArea) if it needs to swap out the flashpage in port 6 and then swap back.
This is something i was planning for, when asmdream used to be a program.
Could allow faster comparison of data located on 2 different flash pages (one on port 6, the other on port 7).
But it's quite a complicated method, since you then need to use port 5 for accessing ram.
In other words, you only have 1 bank left to : run your code, access os ram locations and use the hardware stack.
I guess that's not worth it, since the flash swapping you wanted to avoid has now turned into a horrible ram swapping...
*****
News about the project :
Did some little optimization these days.
I finally found a way (thx to Quigibo) to code the goto feature properly, so i'm actually coding that part.