I wanted to know if it was possible to create a program from a mother program? If so how and preferably in Basic (on ti 83 Pce)

To be clear I would like to execute the program "chicken" (for example) and at the end of its execution, an egg program appears and it is executable (it disp "crac" for example)
Not in pure BASIC. I'm sure somebody else could provide some kind of minimal program implemented in some language that compiles/assembles to machine code that can do it.
Thank you for your answer, I have another idea, it is to store the program in the str0 and make a reply to paste it manually but the problem is that we can not store " in the string
Do you have an idea ?
You cannot directly store double quotes in a string, but there are two ways around that. You can use TextLib's command 26 to get a string with the double quotes symbol, and then concatenate that as-needed; or you can create such a string on-calc yourself. The downside to creating the string yourself on-calc is that you can't do it from a program. To get the double quotes and store ( -> ) symbols into a string, type them on the homescreen and then press enter. You'll get a syntax error. Then press Y= and then 2nd+Enter. This will cause what you last typed on the homescreen to appear in Y1. Then you can go back to the homescreen and use the Equ>Str command found in the Catalog to store the contents of Y1 back into a string.
Alternatively, you could also put a prompt like this at the beginning of your program:

Disp "Please type a double quote:"
Input Str1
/* Str1 now equals " */
Str1 + "HELLO" + Str1 -> Str2
/* Str2 now equals "HELLO" */
thanks, what's the limit for a str on tu 83 Pce ?
9999 maybe I'm not sure
I think 9999 bytes is correct (but, the ClrHome command, for instance, is 2 bytes long)
Thank you for your answer, unfortunately the size of a str is not enough for me stored my program, and it is not very practical to have to reply the str...
Would you have a solution to do it in ASM Automatically?
thank you very much for your time 🙏
Up ?
Would you have a solution to do it in ASM Automatically?
Out of boredom I decided to do this…
If the program already exists, this snippet will not overwrite it. (Hopefully you have OS or below so you have access to the Asm84CEPrgm/Asm83CEPrgm token, if not you can see how to downgrade your OS here.) Don't forget to compress/squish this program with AsmComp( before execution or execute it with Cesium.

Here is a slightly commented version of the eZ80:

#include "ti84pce.inc"
   .db    tExtTok,tAsm84CECmp
   .org   UserMem
   ld     hl, Name
   call   _Mov9ToOP1       ; move to name to OP1
   call   _ChkFindSym      ; try to find it
   ret    nc               ; return if it exists
   ld     hl, Name-Contents
   call   _CreateProg      ; hl -> bc, de -> location of program
   inc    de
   inc    de               ; bypass size bytes
   ld     hl, Contents
; copy in the data (hl->data location, bc->amount of data, de->copy location)
   ret                     ; return
   .db    tDisp,tString,"CRAC"
   .db    ProgObj,"EGG",0  ; playing it safe by not assuming Usermem is nulls

Thx LogicalJoe
just we can't write lowercase ?
For example to write "Crac"

Thx for your help
Lowercase letters use two-byte tokens that do not have the same values as the ASCII lowercase letters. You will have to use the token values, e.g.

.db tDisp,tString,"C",t2ByteTok,tLsmallr,t2ByteTok,tLa,t2ByteTok,tLc

You can find a list of token values on tibasicdev, though the actual names of the tokens are really inconsistent and can be found in ti84pce.inc.

There's probably a better way to do this but I'm not sure exactly how.
Sure you can!
afk right now so this may or may not be correct, I will check it when I get the chance.
sorry i'm not very comfortable with ASM, how to switch from hexadecimal to ez80 text ?
Or can you please send me the eZ80 texte 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
Page 1 of 1
» All times are GMT - 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