Author Topic: copy command not working with expression as size  (Read 7263 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael Pang

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
copy command not working with expression as size
« on: March 03, 2015, 04:17:56 pm »
why does this corrupt my ti84s ram?
Code: [Select]
1->A
Copy(L3,X+2,A)
while this works
Code: [Select]
Copy(L3,X+2,1)
much thanks! Btw I have 1.1.2

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: copy command not working with expression as size
« Reply #1 on: March 03, 2015, 04:19:22 pm »
What's the other code around it?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Michael Pang

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: copy command not working with expression as size
« Reply #2 on: March 03, 2015, 04:27:33 pm »
I'm trying to make a file compression program which will be useless but fun :)
I have an integer B, A bytes in L3 and N bytes in Y that I need to store to a new appvar.
Code: [Select]
GetCalc(L2,A+N+2)->X
B->{X}[sup]r[/sup]
and then the previous code.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: copy command not working with expression as size
« Reply #3 on: March 03, 2015, 04:47:48 pm »
What's at L2? You know you could just, like, GetCalc("appvMYAPPV",A+N+2)
What is the result of X? As in, is it Non-Zero?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Michael Pang

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: copy command not working with expression as size
« Reply #4 on: March 03, 2015, 04:51:51 pm »
L2 contains the string for the new appv. It's copied and modified from the OS's str1.
X is 42000 something

Offline Digital

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +0/-0
  • 10101
    • View Profile
    • Digital's Hp
Re: copy command not working with expression as size
« Reply #5 on: March 03, 2015, 04:53:53 pm »
the lists in axe point to different areas of the calcs memory. maybe this is the reason why it crashes your calc.
I'm sorry if i might make some mistakes, I'm German so English isn't my first language. Please correct me :)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: copy command not working with expression as size
« Reply #6 on: March 03, 2015, 05:01:07 pm »
So your code is this?

Code: [Select]
1->A
1->N
GetCalc(L2,A+N+2)->X
B->{X}r
Copy(L3,X+2,A)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Michael Pang

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: copy command not working with expression as size
« Reply #7 on: March 03, 2015, 05:04:20 pm »
Well, like I said the entire program works fine if I change the size parameter to a constant. So I suspect something is wrong with the parser. For example, the app variable doesn't copy properly if I delete it and then create it shortly afterward with getcalc, but if I move the delvar earlier in the program it works. Without the DelVar, it doesn't copy at all - just overwrites with 0's. I think this might have something to do with memory latency if it's non-blocking, or just a corrupt copy of axe.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: copy command not working with expression as size
« Reply #8 on: March 03, 2015, 05:05:54 pm »
Which version of Axe do you use? The newest one? 1.2.2a

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Michael Pang

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: copy command not working with expression as size
« Reply #9 on: March 03, 2015, 05:09:36 pm »
So your code is this?

Code: [Select]
1->A
1->N
GetCalc(L2,A+N+2)->X
B->{X}r
Copy(L3,X+2,A)

there's other stuff before and after, but yes. I've commented out and recompiled wihtout copy command and it works as expected. I've even tried replacing copy with a for loop and everything works (just a bigger file size)

Version is 1.1.2. I probably should have tried updating before all this :p

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: copy command not working with expression as size
« Reply #10 on: March 03, 2015, 05:10:25 pm »
So your code is this?

Code: [Select]
1->A
1->N
GetCalc(L2,A+N+2)->X
B->{X}r
Copy(L3,X+2,A)

there's other stuff before and after, but yes. I've commented out and recompiled wihtout copy command and it works as expected. I've even tried replacing copy with a for loop and everything works (just a bigger file size)

Version is 1.1.2. I probably should have tried updating before all this :p
Probably :P
If you are looking for the link https://www.omnimaga.org/the-axe-parser-project/latest-updates-%28***do-not-post-here!***%29/msg364694/#msg364694

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Michael Pang

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: copy command not working with expression as size
« Reply #11 on: March 03, 2015, 05:29:04 pm »
Amazing, it worked! Thanks so much :D

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: copy command not working with expression as size
« Reply #12 on: March 03, 2015, 05:31:04 pm »
Glad I could help! Hoping in seeing some topic for a great game/utility/program soon, hehe :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Michael Pang

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Re: copy command not working with expression as size
« Reply #13 on: March 03, 2015, 05:50:49 pm »
I do actually have a lot of random programs that I've made over the past two years in high school. Started out with math programs in ti-basic, then I found axe and started making games and stuff. Too bad I never really finished making a full game with menus and levels and all, since I'd always just write the core engine and then move on to something else :)

If anyone's interested, I could upload axe source for checkers, connect 4, or reversi (most of the code is AI). I also have a neat birds-eye POV second- person shooter.