I have started to learn asm and want to know how you can modify the contents of other programs and appvars (write, erase, create vars, etc.). Also how can I archive and unarchive things using asm? Any help will be appreciated.
Depending on which calculator you're talking about, TI's System Routines documentation PDF would be a great place to start. It has information about bcalls like _CreateAppVar, _CreateProg, _CreateProtProg, _ArcUnarc, and so on. The usual process for creating a program or AppVar looks something like this:
Hope this helps!
- Load the name of the variable to be created into OP1. Determine the size your program is going to be, and load that into hl.
- Call _CreateAppVar or _CreateProtProg or _CreateProg (or ...), which generally will return a pointer to the created variable in DE, starting with the 2-byte size word, then the HL-byte body.
- Usually the OS writes the first 2 bytes (the size word) itself, so you can just skip two bytes to the body
- Write your body.
- If you want to archive it, use _ArcUnarc.
Hope this helps!
KermMartian wrote:
Depending on which calculator you're talking about,
I have a TI-84 Plus C Silver Edition.
Thanks for the documentation but how exactly could I write to a program or appvar. Is there a command that brings you to the editor or something?
I fear the day that technology will surpass our human interaction. The world will have a generation of idiots.
-Albert Einstein
The difference between stupidity and genius is that genius has its limits.
-Albert Einstein
I make mistakes. I say stupid things. I do idiotic things. And, quite frankly, I'm proud of them. Why not make mistakes?
Einstein Quotes
-Albert Einstein
The difference between stupidity and genius is that genius has its limits.
-Albert Einstein
I make mistakes. I say stupid things. I do idiotic things. And, quite frankly, I'm proud of them. Why not make mistakes?
Einstein Quotes
The Einstein wrote:
Thanks for the documentation but how exactly could I write to a program or appvar. Is there a command that brings you to the editor or something?
Do you want to programmatically write to the AppVar/Program? If so, you write a sequence of bytes, and of course you need to determine what that sequence of bytes is to represent a particular set of data, sequence of TI-BASIC tokens, a sprite, whatever you want to put in there. If you want to create an AppVar/Program, then open the editor for the user to edit it themselves, then you're way over your head here, most likely. The techniques involved (see this post, for example) involve manipulating of the OS's context and monitor system, plus a few hooks. You'd be better off just editing a program normally through the program editor, then using assembly to change the program into an AppVar (which only requires editing one byte of the VAT entry for the variable).
The reason I ask is because I want to make an ASM note program that saves to an appvar. Encryption would be a plus though I'm weak in that area.
I fear the day that technology will surpass our human interaction. The world will have a generation of idiots.
-Albert Einstein
The difference between stupidity and genius is that genius has its limits.
-Albert Einstein
I make mistakes. I say stupid things. I do idiotic things. And, quite frankly, I'm proud of them. Why not make mistakes?
Einstein Quotes
-Albert Einstein
The difference between stupidity and genius is that genius has its limits.
-Albert Einstein
I make mistakes. I say stupid things. I do idiotic things. And, quite frankly, I'm proud of them. Why not make mistakes?
Einstein Quotes
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
» Go to Registration page
Page 1 of 1
» 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
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