Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: TeruFSX on November 14, 2011, 10:44:06 pm

Title: Having trouble with a bit of code.
Post by: TeruFSX on November 14, 2011, 10:44:06 pm
I just started messing with Axe Parser today, as it looks to be a pretty good way to develop better programs quick for the 83/84.

I have a program that, when tested on my test systems (wabbitemu running an 84+SE with OS 2.43 and an nSpire in 84+ mode running 2.56MP) causes catastrophic failures. It is being compiled at normal speed, no shell, with Axe Parser 1.05. On wabbitemu, it exits and leaves the calculator with 0 memory remaining. On the nSpire, it basically hung after I tried to exist. On both systems, it didn't do what I designed it to do. The program is here: http://www.pastie.org/private/atcxyiyf76wxevaa804ibg.
Title: Re: Having trouble with a bit of code.
Post by: LincolnB on November 14, 2011, 10:46:15 pm
Honestly, I don't ever use Output(). I use Fix 1 for large font and the Text() function, so I've never really bothered to figure out the Output command syntax.
Title: Re: Having trouble with a bit of code.
Post by: ztrumpet on November 14, 2011, 10:47:33 pm
Hmm, as far as I can tell it should work.  I'm probably missing the same thing you are. :-\
Title: Re: Having trouble with a bit of code.
Post by: TeruFSX on November 14, 2011, 10:50:15 pm
I'd try that instead, but my nSpire is stuck right now and I can't get it to reset. The Axe Parser compiler crashes on wabbitemu, so I can't try there.

EDIT: It might also be that these emulators don't work well enough, but I don't think that's it if the Axe Parser manual recommends developing on wabbit.
Title: Re: Having trouble with a bit of code.
Post by: ztrumpet on November 14, 2011, 10:51:50 pm
I'd try that instead, but my nSpire is stuck right now and I can't get it to reset. The Axe Parser compiler crashes on wabbitemu, so I can't try there.
Try pulling a battery out of the Nspire.  That should fix it.
Title: Re: Having trouble with a bit of code.
Post by: TeruFSX on November 14, 2011, 10:53:24 pm
I have tried that, it doesn't work. I get pulled back to the exact same place I was before taking the batteries out.
Title: Re: Having trouble with a bit of code.
Post by: ztrumpet on November 14, 2011, 10:56:59 pm
Huh.  Try taking out all four batteries, or one out from each side, or something like that.
Title: Re: Having trouble with a bit of code.
Post by: TeruFSX on November 14, 2011, 11:03:40 pm
No success. I'll see what I can do once I get my touchpad back.
Title: Re: Having trouble with a bit of code.
Post by: DJ Omnimaga on November 15, 2011, 01:45:25 am
There's supposed to be a key combination to force a reset when the little reset button behind the calc or a battery pull doesn't work, but I forgot what it was. Hopefully somebody knows.

Also welcome to the forums. :)
Title: Re: Having trouble with a bit of code.
Post by: Michael_Lee on November 15, 2011, 02:27:02 am
I don't own an nspire, but once when I bricked a friend's nspire (by accident, I swear!) it would only reset after I held down the reset button in the hole for like 10-15 secs.  Pressing briefly didn't seem to trigger the full reset.
Title: Re: Having trouble with a bit of code.
Post by: C0deH4cker on November 15, 2011, 10:29:30 pm
You have SMC (Self modifying code) on your hands here. It will crash if its an app. you are writing to the GDB1 pointer, which is stored in your program's memory. Try this instead:

http://www.pastie.org/private/vsgyryqc5hyc5yanga1jg
Title: Re: Having trouble with a bit of code.
Post by: mrmprog on November 15, 2011, 10:33:27 pm
He is correct. In axe, when you do data(blargh...)->GBD1, the data is stored in the program, not to another var. Your code was trying to edit data in itself. However, since it is an app, it can't.
Title: Re: Having trouble with a bit of code.
Post by: aeTIos on November 15, 2011, 10:42:21 pm
Now you're wrong. He said it was a no shell program.
Title: Re: Having trouble with a bit of code.
Post by: mrmprog on November 15, 2011, 10:47:59 pm
Sorry, completely missed that  :(:P
Title: Re: Having trouble with a bit of code.
Post by: Darl181 on November 15, 2011, 10:58:44 pm
Hm, does calling Full on the Nspires cause any problems?