merthsoft wrote:
Why is there a ret?
Well, I'm assuming that this is in a subroutine, something like CreateMyScratchSpace or whatever.
Ah, ok. I was just going to put it at the beginning of the program.
merthsoft wrote:
Ah, ok. I was just going to put it at the beginning of the program.
In that case, you may wish to _delvar or _delvararc if the appvar already exists.
Why not just go ahead and call the creation code? The sys routines guide says it doesn't bother to check.
You'd end up creating a duplicate variable with the same name, which tends to confuse the TI-OS. You need to delete first then create (or, alternatively, ChkFindSym and use the existing variable if it exists, create a new one if not).
benryves wrote:
You'd end up creating a duplicate variable with the same name, which tends to confuse the TI-OS. You need to delete first then create (or, alternatively, ChkFindSym and use the existing variable if it exists, create a new one if not).
Indeed. I was expecting he would probably want to delete and re-create, because if he's using it as a variable-sized piece of scratch memory, he'll want to start it at a predictable size.
Ah, ok. I just assumed it would overwrite it. That make sense.
merthsoft wrote:
Ah, ok. I just assumed it would overwrite it. That make sense.
Nah, as Ben said, it would create a second AppVar with the same name, and generally bad and confusing things would start happening in all likelihood.
Ok, so after this de will have the "pointer to variable's data storage, size bytes". Does that mean de points to where I'll want to be putting data? or de + something?
The first two bytes of the variable are its size (in variables which store a variable size). So you'd need to increment DE by two to get to the data.
benryves wrote:
The first two bytes of the variable are its size (in variables which store a variable size). So you'd need to increment DE by two to get to the data.
This exactly. I'd say that you should remember de so that you can update the size word later when you want to insert or delete memory from the appvar to change its size, but since you're dealing with the DCS GUI system, the GUI system will reorder memory once you start it up, so you should just do a _ChkFindSym on the appvar when you're ready to use it or resize it.
Woo, got it to work!!!
merthsoft wrote:
Woo, got it to work!!!
Congrats, Merth. What exactly did you get working at this point?
I'm specifically speaking of AppVars!
merthsoft wrote:
I'm specifically speaking of AppVars!
Then congrats; I'm glad to hear of your success in creating and deleting them. I hope you find resizing them as painless.
Hmm, I hadn't even thought of resizing them. I'm not sure that I will need to for this project.
merthsoft wrote:
Hmm, I hadn't even thought of resizing them. I'm not sure that I will need to for this project.
You're going to be using it for the chat scrollback and the user list, right? So aren't you going to need to resize it as the scrollback and user list grow and shrink? Or are you going to save yourself a headache and put a maximum cap on that?
I was just going to cap it. It seems like there shouldn't need to be all that much scroll back, and each name only takes like 15 bytes, so with 500 bytes that's like 33 names. I don't know how many people will have 33 calcs connected, at least at first Smile
merthsoft wrote:
I was just going to cap it. It seems like there shouldn't need to be all that much scroll back, and each name only takes like 15 bytes, so with 500 bytes that's like 33 names. I don't know how many people will have 33 calcs connected, at least at first Smile
Definitely agreed. Perhaps one screenful (about 255 characters max) of scrollback, which is a worst-case of lines made up entirely of l's or i's?
The way it is now, it just created 500 byte appvars for everything. I might change that if I feel it's too much or too little. Maybe let people set the size of their log file Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6  Next
» View previous topic :: View next topic  
Page 5 of 6
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement