Question:
TI-83+ programming question. Is it possible to archive/unarchive other programs from within a program?
samuel
2012-01-30 11:46:33 UTC
Hi, during my free time in class I write programs on my TI-83+. Sometimes it's games, sometimes it's a practical program for math class or something.

Well, anyways, I like to keep my programs in the 'archived' memory so they don't get deleted if the RAM clears. But, some of my programs use subroutines, that is, they use other programs as part of themselves. The problem is that in order to use a program, I have to go through and manually move the program and all its subroutines from the 'archive' memory to the RAM memory.

My question is, can I use a command inside of my program to 'archive' and 'unarchive' other programs/subroutines as needed?
Three answers:
?
2012-01-30 17:37:21 UTC
Yes and no. The Archive and UnArchive commands will not archive programs while running in one, just like you can't use For( loops, If statements, etc... on the home screen (you can, however, use the Archive/UnArchive commands to (un)archive data, such as variables, lists, and whatnot). By that logic, it's impossible to Archive or UnArchive one TI-Basic program from within another.



That's the 'no' answer.



The 'yes' answer is that it is in fact possible to archive/unarchive from within a TI-Basic program, but that requires you to have and run an unarchived assembly subprogram as one of your subroutines. Usually, I'd say it's more work than necessary, but since you don't mind using subprograms I'll tell you anyway.



Basically, we're going to create a z80 assembly program in hexadecimal op codes which tricks the calculator into thinking home screen mode is program mode, and vice-versa. That way, you'll be able to run If statements, loops, etc on the home screen, but more importantly, archive programs from within a program.



Create a new program and call it ARC (or whatever). Type the following in:

:AsmPrgm21F8893E02AE77C9



The AsmPrgm token can be found in the Catalog ([2nd][0]). Make sure you type that hexadecimal string EXACTLY as shown, because making a single typo could permanently brick your calculator.



Now, in your regular program, you should put the following:

:Asm(prgmARC

:UnArchive prgmSUBPRGM1

:UnArchive prgmSUBPRGM2

:Asm(prgmARC

:// your program does whatever here

:Asm(prgmARC

:Archive prgmSUBPRGM1

:Archive prgmSUBPRGM2

:Asm(prgmARC



The Asm( token can also be found in the Catalog.

It's important that you run prgmARC twice, because otherwise you'll be stuck in program mode while trying to calculate something on the home screen.



So yeah, use with caution.
?
2012-01-30 11:54:59 UTC
Here is what I found, "Although programs can be archived and unarchived, the Archive and UnArchive commands will not archive or unarchive programs from within a program."



http://tibasicdev.wikidot.com/unarchive



You could look into the basic tool program from ticalc.org. Not sure if you could scavenge enough information from it.



http://www.ticalc.org/pub/83plus/flash/programs/basicbuilder/
emch
2016-10-05 02:33:35 UTC
Programming certainly one of those interest will require lots of time and soreness. in case you have the cable to flow records from one calculator with yet another you may desire to apply that to get carry of video games from persons. it truly is how I have been given tetris, pong, snakes until i desperate to delete them. properly, this is an determination you have over procuring the 60 dollar cable and programming it your self.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...