Author Topic: Having trouble with a bit of code.  (Read 7964 times)

0 Members and 1 Guest are viewing this topic.

Offline TeruFSX

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 5
  • Rating: +0/-0
    • View Profile
Having trouble with a bit of code.
« 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.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Having trouble with a bit of code.
« Reply #1 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.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Having trouble with a bit of code.
« Reply #2 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. :-\

Offline TeruFSX

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 5
  • Rating: +0/-0
    • View Profile
Re: Having trouble with a bit of code.
« Reply #3 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.
« Last Edit: November 14, 2011, 10:51:45 pm by TeruFSX »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Having trouble with a bit of code.
« Reply #4 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.

Offline TeruFSX

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 5
  • Rating: +0/-0
    • View Profile
Re: Having trouble with a bit of code.
« Reply #5 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.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Having trouble with a bit of code.
« Reply #6 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.

Offline TeruFSX

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 5
  • Rating: +0/-0
    • View Profile
Re: Having trouble with a bit of code.
« Reply #7 on: November 14, 2011, 11:03:40 pm »
No success. I'll see what I can do once I get my touchpad back.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Having trouble with a bit of code.
« Reply #8 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. :)

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Having trouble with a bit of code.
« Reply #9 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.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Having trouble with a bit of code.
« Reply #10 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

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Having trouble with a bit of code.
« Reply #11 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.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Having trouble with a bit of code.
« Reply #12 on: November 15, 2011, 10:42:21 pm »
Now you're wrong. He said it was a no shell program.
I'm not a nerd but I pretend:

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Having trouble with a bit of code.
« Reply #13 on: November 15, 2011, 10:47:59 pm »
Sorry, completely missed that  :(:P

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Having trouble with a bit of code.
« Reply #14 on: November 15, 2011, 10:58:44 pm »
Hm, does calling Full on the Nspires cause any problems?
Vy'o'us pleorsdti thl'e gjaemue