Author Topic: Data() and appvars  (Read 6626 times)

0 Members and 2 Guests are viewing this topic.

Offline dinosteven

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 194
  • Rating: +10/-1
    • View Profile
Re: Data() and appvars
« Reply #15 on: July 21, 2012, 06:17:10 pm »
Why did everything turn into a 0? It's probably because of the line
:Copy(GDB1,A,64)
But how can I fix this?

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Data() and appvars
« Reply #16 on: July 21, 2012, 06:39:51 pm »
i'm not into axe, but it sound like S is only an integer (1 byte, 8 bits) zo that it can only hold one value at a time, and not an array of values.

by copying everything to S, you overflow it, and corrupt the data after the memory address of S
(that's what i think it is)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Data() and appvars
« Reply #17 on: July 21, 2012, 06:41:35 pm »
Before you do anything else, I'd recommend you clear your RAM then try again. Sounds like you've corrupted your RAM somewhere along the way (better get used to it ;D), so it'd be better to start again on a clean slate.

Your code works fine for me. Why not update Axe to the latest version first? There are always lots of bugfixes between versions.

EDIT: Can you post your new code? I don't understand what you mean by replacing GDB1 with S.
« Last Edit: July 21, 2012, 06:43:21 pm by Deep Thought »




Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Data() and appvars
« Reply #18 on: July 21, 2012, 06:47:22 pm »
In Axe 1.0.0, a new optimization system was added: a peephole optimizer. Unfortunately, with it came quite a few bugs in its initial and few following releases of Axe. Axe 1.0.5 is one version which has a few bugs, one of which affects any program that contains a Copy() command for which the third argument is a constant (in this case, 64).

The best way to fix this would be to upgrade to the latest version of Axe: 1.1.2. Alternatively, you can fix this temporarily by disabling the peephole optimizer when compiling by pressing ZOOM to compile your program from Axe's list of source programs to compile instead of pressing ENTER.

Offline dinosteven

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 194
  • Rating: +10/-1
    • View Profile
Re: Data() and appvars
« Reply #19 on: July 21, 2012, 06:55:29 pm »
Yes! After an update to Axe v 1.1.2, RAM clearing, compiling, and running, the error message disappeared.
Thanks for all the help!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Data() and appvars
« Reply #20 on: July 21, 2012, 07:24:35 pm »
You know, I've been wondering why so many new members seem to start at Axe 1.0.5... Seems like that's the version at ticalc.org: http://www.ticalc.org/archives/files/fileinfo/428/42813.html

Someone needs to fix that D:




Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Data() and appvars
« Reply #21 on: July 21, 2012, 10:24:40 pm »
I would, but they rejected The Mighty Jill Off :P
In-progress: Graviter (...)

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Data() and appvars
« Reply #22 on: July 21, 2012, 10:34:38 pm »
What does that have to do with updating Axe? And I thought only the original author could update their programs?