Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Xeda112358 on February 17, 2012, 08:13:23 am

Title: ReName
Post by: Xeda112358 on February 17, 2012, 08:13:23 am
Have you ever needed to rename a program and you didn't want to download or you don't have a whole App to do it? Well here you go :) To rename it, put the new name in Str1 and the current name in Ans and then run Asm(prgmRENAME. So as an example, to change prgmMEANDHIM to prgmHEANDI (you know, for proper grammar :P ), you can do this:
Code: [Select]
"HEANDI→Str1
"MEANDHIM
Asm(prgmRENAME

EDIT: Opcode included
Title: Re: ReName
Post by: Hayleia on February 17, 2012, 01:10:09 pm
Yeah :D
This is very useful !

Though, the program must be in RAM, right ?
(not a problem, just for clarification ;))
Title: Re: ReName
Post by: Torio on February 17, 2012, 01:49:46 pm
According to the gif, it seems that the program to rename can be archived.
Title: Re: ReName
Post by: calc84maniac on February 17, 2012, 02:24:58 pm
I wouldn't recommend renaming an archived program. If you rename an archived program and Garbage Collect before you've unarchived or deleted it, then problematic stuff happens (you can't access that program until the next RAM Clear and causing any OS error will crash the calculator)
Title: Re: ReName
Post by: Xeda112358 on February 17, 2012, 02:27:50 pm
The program to rename can be in RAM or archive, but prgmRENAME must be in RAM to run it normally (unless you have a shell that lets you run it from Archive).

EDIT: Don't do that ^ I got ninja'd by calc84maniac, luckily. I had never known that :D

So to be clear: Do not rename archived programs and then garbage collect. I am working on fixing it to automatically unarchive the program first.
Title: Re: ReName
Post by: thepenguin77 on February 17, 2012, 04:10:44 pm
Of course this is irrelevant, but I rename programs by changing them to unprotected programs, [2nd] [RCL]'ing them into a new basic program with the correct name, and the changing the back to a protected program.

But this looks way easier :P