Author Topic: Need moar variables...  (Read 13477 times)

0 Members and 1 Guest are viewing this topic.

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Need moar variables...
« on: October 18, 2010, 05:48:38 pm »
Is there a way to access moar variables in Axe?  Like the Finance variables for BASIC, or something like lists?  or can the Axe lists do this?  if so, I need to figure out how to do it.  ;)

TIA 8)

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Need moar variables...
« Reply #1 on: October 18, 2010, 05:50:01 pm »
if you need more variables, there are several option open to you.  In portal, i use memory locations for many variables.  Like {L1+13}r is the same speed and takes the same amount of memory as the variable A. 

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: Need moar variables...
« Reply #2 on: October 18, 2010, 05:50:47 pm »
{address}r is the same as a regular variable.

Ex:
{L1}r
{L1+8}r
{L4}r
{oA}r (This is the same as just doing A)

Good luck. :)

Edit: Ninja'd O0
« Last Edit: October 18, 2010, 05:51:09 pm by ztrumpet »

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Need moar variables...
« Reply #3 on: October 18, 2010, 05:51:11 pm »
could you elaborate on that a bit?  How would you know which ones are usable?

EDIT:  I was replying to Builderboy
« Last Edit: October 18, 2010, 05:52:02 pm by yunhua98 »

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Need moar variables...
« Reply #4 on: October 18, 2010, 05:51:52 pm »
you can use any portion in the free RAM areas L1-L6 as your own variables.


Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Need moar variables...
« Reply #5 on: October 18, 2010, 05:54:51 pm »
you can use any portion in the free RAM areas L1-L6 as your own variables.

I see, so if I did 5->{L1}, and then wanted moar variables, I would do 42->{L1+1}  but if I wanted to store a two byte number, would I do 256->{L1+2}r?

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Need moar variables...
« Reply #6 on: October 18, 2010, 05:57:11 pm »
yes. be careful about it though. if you do 256->{L1+2}r, make sure you don't try to make a variable at {L1+3}, because this is already being used by the two byte variable at L1+2


Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Need moar variables...
« Reply #7 on: October 18, 2010, 05:58:14 pm »
which RAM area would be best and most stable to use?

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

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: Need moar variables...
« Reply #8 on: October 18, 2010, 05:59:15 pm »
L1.  Read up on it in the commands list if you want more info. :)
« Last Edit: October 18, 2010, 05:59:27 pm by ztrumpet »

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: Need moar variables...
« Reply #9 on: October 18, 2010, 05:59:24 pm »
And don't write beyond the limits of L1.  That is called an overflow error and strange and terrible things will happen to your calculator as a result.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Need moar variables...
« Reply #10 on: October 18, 2010, 06:00:42 pm »
yeah... just don't use more than 700 bytes worth of variables and you'll be fine (like you even need 350 variables)


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Need moar variables...
« Reply #11 on: October 18, 2010, 06:00:43 pm »
L1. In that area of safe RAM (the 54 bytes before where L1 points) is where the built-in 27 variables reside, too.

EDIT: Mega ninja'd.
« Last Edit: October 18, 2010, 06:01:26 pm by Runer112 »

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: Need moar variables...
« Reply #12 on: October 18, 2010, 06:00:51 pm »
Note that in some cases, using L2 might cause incompatibility with MirageOs for the people that still uses it. It conflicts with Mirage's interrupts.

I personally use L1 most of the time.
« Last Edit: October 18, 2010, 06:02:46 pm by DJ Omnimaga »

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Need moar variables...
« Reply #13 on: October 18, 2010, 06:01:10 pm »
ok, thanks guys!  as for the commands list, well, lets just say I find it a bit hard to understand at times.  :P

EDIT:  600 posts!
* yunhua98 anticipates becoming evil.  >:D
« Last Edit: October 18, 2010, 06:02:18 pm by yunhua98 »

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

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: Need moar variables...
« Reply #14 on: October 18, 2010, 06:02:56 pm »
Btw with L4, it talks about corruptions with the Archive/Unarchive. Does it means the Axe archive/unarchive commands or the entire TI-OS after exiting your program?