|HP42S programming (text editor)|
Message #1 Posted by Christof on 15 Jan 2003, 12:55 p.m.
Well, I'm working on some text editor and "file utility" fucntions for the 42S, limited to what I cna code on the machine (menaing I'm not doing simulator and saturn assembly..... yet.)
So far I've got two systems running side by side- one uses an x row by 8 column array to hold the alpha data in groups of 6 letters per element. one problem with this is that you need to somehow control the display of empty elements to prevent excessive numerics. (I generally have my machine set to fix 5 and end up with 42 0s in the alpha register if I have a >7 character string, for example)
The other method is to make an x by 44 matrix and use individual character codes, but this seems to just add a problem of taking more memory (not everyone has ~31500 bytes to play with)
I also have not found a way around the need to use the r/s key after doing alpha entry. The best I've done (and found int he programming guide that this is what they do as well) is:
anyone have anyhting better? There are two main uses, one is to type in the [programmer restricted] 6 character "filename" with then gets ASTO 40 (I use registers 40-49 thus far to prevent overwriting other regs, we shall see)
the other main use is the actual editing and entering of textual data (44 character line limit) which then gets stored in 6 character chunks into the various columns of the current row of a matrix.
I'm doing this all fairly conventionally, using the 42S manual and the PDF of the Programming guide as references.
If I'm missing anything important, someone holler up :)
The matrix system for forming "text files" seems to be the only way I can do this given the 42S system...
the other functions I'm working on (or in a few cases have done) include newfl (making a new "file"), cat (straight concat file x into file y), merge (take files z and y & create a new file x), list (list matrixes identified as "files"), copy (done within TXTED to keep the file listing straight), delete (same reason), and I've got the menu hooks for an encryption and decryption method for fun (but that is lower priority than the rest and not started beyond having blank labels.)