A89: Strings


[Prev][Next][Index][Thread]

A89: Strings



I was trying to create a new string variable, but a few problems occurred when I tried to save things into it.  The first thing I noticed was that on the doors explorer description bar it would write everything that was stored in the string. For example, if I saved abcdefg to the file, in the doors description bar of the program it would show abcdefg.  Is that normal?  Or do I have to put a pointer on the third byte of the string to a comment or whatever?
 
In my program, I used a routine to input a string, which was ten characters long.  Then, I tried storing eight of those characters into the string file.  That worked fine.  In the program I had set up a counter to know which was the last byte in the string file and then the next time something needed to be stored into the string file, it would hypothetically store after the last data that was stored into the file.  However, the next time I ran the program, it remained a string file (because after every time I wrote to it I would put a $2D after the last character) and the file increased the correct number of bytes, but there was nothing in the string file and after I tried running doors again, the calc crashed.  I'm not sure why this is happening; I can only guess that I must be storing to the wrong place.  The only problem is that when I tried writing to the eighth byte or other number bytes of the string file right after I created the new string, it screwed up as well.
 
I'm attaching the source to the routine that I'm writing, and hopefully if you take a look at it you might see what is wrong or if I need to redo it completely.  What I'm trying to do is create a phone book program, and this new string will be where I store the information for different people.  Thanks in advance for the help, and also if you have any questions about my problem or whatever, please email me.  Thanks again.
 
Also......when you input numbers for the string, there sometimes is an internal error or something, so just try it with letters.  It used to be able to do numbers, but for some reason it started giving me errors today.

rstring.asm


Follow-Ups: