Author |
Message |
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 29 Jan 2011 10:27:18 pm Post subject: |
|
|
At 123 bytes, CopyProg is a tiny assembly program that gives the user some amazing power.
How awesome would it be to be able to copy the contents of one program to another? It would be pretty cool, right?
Now add a little more to that...
How cool would it be if you could copy archived programs to a new program? It would be pretty awesome, right?
Now scratch all of that. How amazing would it be if you could copy one archived variable to another? How awesome would it be to copy a picture to a program? Or an Appvar to a picture? Or a String to a GDB? All from archive or RAM, too. And just think, it is only 123 bytes.
Here are some screenshots of this little program in action: |
|
Back to top |
|
|
Ben24
Newbie
Joined: 28 Dec 2010 Posts: 16
|
Posted: 30 Jan 2011 03:28:21 am Post subject: |
|
|
Amazing. Fantastic Contribution.
One thing that I did notice, is that if I copy a program to one that doesn't exist, the copied program is executable but not editable. However, if I copy a program to one that does exist, everything works as expected.
It's not really a problem. In fact it adds functionality, preventing programs from being accidentally edited :D
- Ben
Last edited by Guest on 30 Jan 2011 03:35:40 am; edited 1 time in total |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 30 Jan 2011 06:30:40 am Post subject: |
|
|
Ah, yeah. Actually, the "[" makes it a protected program. You could use "E" or "BoxPlot" instead. |
|
Back to top |
|
|
Galandros
Active Member
Joined: 29 Aug 2008 Posts: 565
|
Posted: 30 Jan 2011 06:09:11 pm Post subject: |
|
|
Nice for copying archived programs and larger programs in ram faster.
Note that you can use the Rcl and Pgrm trick.
For those who doesn't know try:
1st: create a new program
2nd: press [2nd], [STO>]
3rd: then [PRGM] left, left and pick the program you want to paste, then [Enter] [Enter] |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 30 Jan 2011 06:48:53 pm Post subject: |
|
|
Yeah, the program was originally supposed to just work with programs, but I decided to take it a step further and I added support for many variable types just 'cause I could |
|
Back to top |
|
|
Ben24
Newbie
Joined: 28 Dec 2010 Posts: 16
|
Posted: 30 Jan 2011 08:26:22 pm Post subject: |
|
|
ThunderBolt wrote:
Ah, yeah. Actually, the "[" makes it a protected program. You could use "E" or "BoxPlot" instead.
Brilliant, works perfectly.
I'll have to look into how you did this, I think I skipped the VAT lesson in "TI-83+ Asm in 28 Days" :S |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 30 Jan 2011 09:35:39 pm Post subject: |
|
|
Ah, it isn't much with the vat, really. I just made use of a lovely B_Call called _CreateVar. |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog
Joined: 20 May 2003 Posts: 2369
|
Posted: 31 Jan 2011 12:30:35 am Post subject: |
|
|
That is pretty neat. We were never able to do that back in the day |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 31 Jan 2011 12:55:45 am Post subject: |
|
|
It's because of "the day" that I could do this ^-^ |
|
Back to top |
|
|
Madskillz
Active Member
Joined: 02 Jan 2004 Posts: 608
|
Posted: 31 Jan 2011 01:39:19 pm Post subject: |
|
|
I remember copying over a program in BASIC like Galandros said. But being able to copy over all those things and with them archived too. I think it is definitely useful. |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 01 Feb 2011 06:10:23 pm Post subject: |
|
|
So the new update will cause no problems with programs that already use CopyProg. However, in this new version, you also have the ability to delete variables. The name of the var to delete is stored in Ans and also with a minus sign in front. So to delete prgmTEMP, you could do:
Code: :"-[TEMP
:Asm(prgmCOPYPROG
So the "-" tells it to delete the var and the "[" tells it that the name refers to a program. The deleting function works on any variable type even if it is archived.
EDIT: 14 February 2011-I was informed by mrmprog in a later post that this was an incorrect version (deleting used "Delvar " instead of "-"). This version should be correct, now.
Last edited by Guest on 14 Feb 2011 07:23:11 pm; edited 1 time in total |
|
Back to top |
|
|
mrmprog
Newbie
Joined: 04 Feb 2011 Posts: 44
|
Posted: 05 Feb 2011 12:48:26 pm Post subject: |
|
|
This is fantastic! Now we can create Basic self modifying code. The delete function makes this even better.
Last edited by Guest on 07 Feb 2011 09:07:36 pm; edited 1 time in total |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 05 Feb 2011 12:57:43 pm Post subject: |
|
|
Oh, wow, yeah! SMC will be really easy! You could do something like this:
Code: :Input "CODE:",Str2
:"Str2→Str1
:"[SMC
:Asm(prgmCOPYPROG
:prgmSMC
:"-[SMC
:Asm(prgmCOPYPROG
This will let the user input BASIC code and then that code is copied to prgmSMC. prgmSMC is executed, then deleted.
Last edited by Guest on 05 Feb 2011 01:00:48 pm; edited 1 time in total |
|
Back to top |
|
|
mrmprog
Newbie
Joined: 04 Feb 2011 Posts: 44
|
Posted: 13 Feb 2011 11:05:49 am Post subject: |
|
|
Do you use the subtract sign or the negative sign to delete peograms?
Last edited by Guest on 13 Feb 2011 11:06:01 am; edited 1 time in total |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 13 Feb 2011 11:55:57 am Post subject: |
|
|
The subtract sign is used to delete.Also, if you use "V" as a prefix you can create a temp program (I believe I've already told mrmprog this). Temp programs automatically get deleted so you usually do not need to worry about deleting them yourself and they get used just like regular programs. Also, if a temp program is running and the user presses [ON] there will be no Goto option. |
|
Back to top |
|
|
mrmprog
Newbie
Joined: 04 Feb 2011 Posts: 44
|
Posted: 13 Feb 2011 11:59:48 am Post subject: |
|
|
*mrmprog smacks head
I tried to delete a program and it cleared my ram! Now whenever I try to delete something, it says done but does not do anything. |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 13 Feb 2011 12:05:41 pm Post subject: |
|
|
Hmm, that is weird, I haven't had that problem. Would you mind posting what your input was? |
|
Back to top |
|
|
mrmprog
Newbie
Joined: 04 Feb 2011 Posts: 44
|
Posted: 13 Feb 2011 12:14:23 pm Post subject: |
|
|
I had a program θθθθθθθθ. I did Code: :"-Eθθθθθθθθ
:Asm(prgmCOPYPROG
My calculator froze for five mins so I had to pull a battery. |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 13 Feb 2011 12:25:29 pm Post subject: |
|
|
Hmm, I just tested it and it worked fine for me... do you have any other apps or assembly programs being used? And which OS do you have (sorry, I forget ) |
|
Back to top |
|
|
mrmprog
Newbie
Joined: 04 Feb 2011 Posts: 44
|
Posted: 13 Feb 2011 02:52:29 pm Post subject: |
|
|
Mirage OS, Omnicalc, and os 2.40. |
|
Back to top |
|
|
|