Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.

Code:
ClrDraw
4->theta:" ->Str9
"ATEST"->Str0
Asm(prgmCELTIC2
Text(1,1,"Create program ",Str9
2->theta:1
Asm(prgmCELTIC2
Text(14,1,"Add line ",Str9
0->theta:0
Asm(prgmCELTIC2
Text(27,1,"# of lines ",theta,"   ",Str9
4->theta:Asm(prgmCELTIC2
Text(40,1,"Special string created ",Str9
"Pause "+sub(Str9,1,1)+"Hello!"+sub(Str9,1,1)->Str9
1->theta:1
Asm(prgmCELTIC2
prgmATEST
0->theta:1
Asm(prgmCELTIC2
Text(53,1,Str9
7->theta:2
Asm(prgmCELTIC2
Text(66,1,Str9
0->theta:0
Asm(prgmCELTIC2
Text(79,1,"# of lines ",theta,Str9
8->theta
Asm(prgmCELTIC2
Text(92,1,Str9
6->theta
Asm(prgmCELTIC2


Sadly, this doesn't work, as it doesn't seem to create the program. :< It errors out when I try, and it leaves me with:



I'm not really sure why it's giving me a 'program is found' error for the creation of the special string.

Thoughts?
After a half-hour of debugging, I discovered that the source code you gave me had (at least) one bug. In Iambian's code to search for existing programs, he first searches for "normal" programs/appvars, then hidden programs/appvars. He changed the name in-place to search for the hidden version, and when it was not found, he didn't change it back, so a hidden program/appvar ended up being created. That's why it didn't produce an error from the program creation step. Please try again with the executable I will shortly email you.


Well, we are closer! It does indeed create the program, and it stored most of the string. I don't think it's creating the string properly, something I'm going to test right now.. Just have to edit the display code to see what happens..

It's not doing anything with it, sadly. So now the issue is with creating the "-> tokens and leaving them in Str9. Getting closer!
I believe your code may be incorrect:

Code:
4->theta:Asm(prgmCELTIC2
Text(40,1,"Special string created ",Str9
I believe theta=4 is "create program".
Neutral

Don't mind me, just being dumb over here.

Neutral
tifreak8x wrote:
Neutral

Don't mind me, just being dumb over here.

Neutral
So does that mean all the functions actually work? It would be very cool if that was the case. Smile Also, did you know that "rowSwap(" can be used as a prefix to indicate AppVars instead of programs? I knew that for Celtic III, but I didn't realize Celtic2 could do the same thing until I looked through the source.
Yep, I knew that, hence how pokemon has been using appvars for data storage Wink Remember the hulking monster known as ZITU? It even has its own thread in here.

And I have to make a few alterations to my code, I wrote a couple of things wrong. :/ Stupid me.

I'll let you know shortly if it is fully functional.

Edit:

Seems everything works except the Insert Line function (theta = 2). If I make it look for a line 1, and don't do anything with Str9, it will happily run the program, everything is good. If I change it to look at line 2, or make Str9 contain " ", it causes it to not drop the code into the test program.


Code:
ClrDraw
4->theta:" ->Str9
"ATEST"->Str0
Asm(prgmCELTIC2
Text(1,1,"Create program ",Str0,"   ",Str9
2->theta
1
Asm(prgmCELTIC2
Text(14,1,"Add line ",Str9
0->theta:0
Asm(prgmCELTIC2
Text(27,1,"# of lines ",theta,"   ",Str9
3->theta:Asm(prgmCELTIC2
Text(40,1,"Special string created ",Str9
"Pause "+sub(Str9,2,1)+"Hello!"+sub(Str9,2,1)->Str9
1->theta:1
Asm(prgmCELTIC2
prgmATEST
0->theta:1
Asm(prgmCELTIC2
Text(53,1,Str9
7->theta:2
Asm(prgmCELTIC2
Text(66,1,Str9
0->theta:0
Asm(prgmCELTIC2
Text(79,1,"# of lines ",theta,Str9
8->theta
Asm(prgmCELTIC2
Text(92,1,Str9
6->theta
Asm(prgmCELTIC2


This is what works thus far.
Also, I was wondering if you could apply the same fixes to the original source so I can have a nicer, bug freer version of it for pokemon? Smile If/when you have a few minutes and are willing. I can understand if you do not want to.
Are the rest of us going to be able to use this, or are you two just gonna keep it to yourselves? Sad
Once it's bug free and everything works, I'm sure he plans on posting it up. The only thing that's left is the insert line bit.
As tifreak8x says, it will certainly be released to the general public once I get everything working. Smile tifreak8x, I am able to replicate your results with theta=2, but from reading the code, it doesn't appear that it's designed to let you append to programs, just insert at/before existing lines. Is this not the case for the Celtic 2 you use with Pokemon Purple? Would it properly handle inserting on line 2 of a 1-line program?
I never use it, I mainly use Celtic2 for the copy/pasting functions it has, and that is all 1 long line of code anyways. I never noticed that this didn't work before, because of that.

And if that's the case, change it to line 1 and it still won't do it. Because if you tell it line one, it should shove line 1 to line 2, right?
That's correct, that is what it should do. While I test that, can you please throw a quick line 1/line 2 test at the TI-83+/TI-84+ version of Celtic 2 and see what it does?
Seems it can't create programs. It's probably that bug you mentioned about checking if it exists first before creating or something that you fixed with the CSE version.
tifreak8x wrote:
Seems it can't create programs. It's probably that bug you mentioned about checking if it exists first before creating or something that you fixed with the CSE version.
Yeah, that sounds likely. If you create the program by hand with 1 line of contents, are you able to insert lines? If not, then the 83+/84+ has those exact same bugs, and we'll have to figure out how you want me to fix them to make Celtic 2 the most useful to you and others.
Actually, I know for a fact the version before the one you have source for worked perfectly. Iambian was going to add theta 7 and 8, but somehow things got messed up and he never fixed them, then when he did, he lost it and gave up.

Sadly, I don't have source for the version that is in pokemon. :< So yeah, it'd be great to get them same bugs worked out if possible.

And if it doesn't work on the CSE, do you think it will on the normal +s?
tifreak8x wrote:
And if it doesn't work on the CSE, do you think it will on the normal +s?
I guess not. Can you instead try with that previous version? If it works, I will try to disassemble that version to see what he changed, or more precisely, how he handled things there.
It does not seem that the insert line function works there, either :<

But the creation of programs works just fine, as does the pasting of data and all that.
*bump*

I'm curious if any portion of your mind has given thought to the insert line problem? Smile No rush, of course.
tifreak8x wrote:
*bump*

I'm curious if any portion of your mind has given thought to the insert line problem? Smile No rush, of course.
So I haven't figured out in the very few brain cycles I've given to this problem how to make the routine scan for lines differentiate between when it is correct for it to report a line being missing, and when it should take that as a hint to append. On top of that, I didn't get far enough in understanding Iambian's code to see how it resizes programs/appvars when necessary. I just need to sit down with it for an hour or two; perhaps with a bit of nagging you can get me to get around to it this weekend.
  
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 4
» 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

 

Advertisement