Author Topic: External variables in axe parser  (Read 9714 times)

0 Members and 1 Guest are viewing this topic.

Offline PC5LeGeND

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +0/-1
  • TI-84 asm programmer
    • View Profile
Re: External variables in axe parser
« Reply #15 on: May 30, 2012, 01:55:24 pm »
Oh srry i didnt know that i was double posting srry
TI-84/TI-83 ASM programmer

TI-84/TI-83 BASIC programmer

Java program





Offline PC5LeGeND

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +0/-1
  • TI-84 asm programmer
    • View Profile
Re: External variables in axe parser
« Reply #16 on: May 30, 2012, 02:30:06 pm »
Omg it works thank you guys i will maybe do a pre release soon
TI-84/TI-83 ASM programmer

TI-84/TI-83 BASIC programmer

Java program





Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: External variables in axe parser
« Reply #17 on: May 30, 2012, 02:30:54 pm »
You just double posted again D:
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: External variables in axe parser
« Reply #18 on: May 30, 2012, 02:31:03 pm »
Yay a pre-release :3 You play minecraft I assume XD
If you like my work: why not give me an internet?








Offline PC5LeGeND

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +0/-1
  • TI-84 asm programmer
    • View Profile
Re: External variables in axe parser
« Reply #19 on: May 30, 2012, 03:12:25 pm »
Yeah i play minecraft but i didnt double post or does it mean i post 2 times after eachother ?? Than srry about that i thought it mean you post 2 times the same
TI-84/TI-83 ASM programmer

TI-84/TI-83 BASIC programmer

Java program





Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: External variables in axe parser
« Reply #20 on: May 30, 2012, 03:41:19 pm »
If your "list" contains zeros, then you will need to make a counter variable that simply stores the length of the array. For example, L could be the length, and the array would be in L1. Then, whenever you want to append data to the array:
myNum->{L + L1}
L++


To read the last element:
{L-1+L1}

To remove an element, you can either write the last element as zero and then decrement the length counter, or simply decrement the length counter if you know that you won't be reading from after the array.
« Last Edit: May 30, 2012, 03:41:46 pm by C0deH4cker »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: External variables in axe parser
« Reply #21 on: May 31, 2012, 12:54:29 am »
i didnt double post or does it mean i post 2 times after eachother ?? Than srry about that i thought it mean you post 2 times the same
Yes, double posting is posting 2 times in a row, not necessarily the same post :)

If your "list" contains zeros, then you will need to make a counter variable that simply stores the length of the array. For example, L could be the length, and the array would be in L1. Then, whenever you want to append data to the array:
myNum->{L + L1}
L++


To read the last element:
{L-1+L1}

To remove an element, you can either write the last element as zero and then decrement the length counter, or simply decrement the length counter if you know that you won't be reading from after the array.
Or still use my method with a number X other than zero that is not in the list :P

_______________________

Fill(L1,711,0)
.this at the very beginning of your program

...
your code here
...
Return
.End of your code

Lbl Dim
0->r2
{r1}
While -X
 r2++
 {r1++}
End
Return r2
_______________________
« Last Edit: May 31, 2012, 12:55:14 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline PC5LeGeND

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +0/-1
  • TI-84 asm programmer
    • View Profile
Re: External variables in axe parser
« Reply #22 on: May 31, 2012, 12:58:59 am »
My lvl editor works but if i want to get values from my list it say invalid dim is there a command so that i can strore it and acces from my caculator OS
TI-84/TI-83 ASM programmer

TI-84/TI-83 BASIC programmer

Java program





Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: External variables in axe parser
« Reply #23 on: May 31, 2012, 12:58:50 pm »
My lvl editor works but if i want to get values from my list it say invalid dim is there a command so that i can strore it and acces from my caculator OS
No
If you like my work: why not give me an internet?








Offline PC5LeGeND

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +0/-1
  • TI-84 asm programmer
    • View Profile
Re: External variables in axe parser
« Reply #24 on: May 31, 2012, 02:15:54 pm »
That...is a problem
TI-84/TI-83 ASM programmer

TI-84/TI-83 BASIC programmer

Java program





Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: External variables in axe parser
« Reply #25 on: May 31, 2012, 03:04:16 pm »
Why would you want to use the OS's lists? It is much easier to use free ram areas and appvars.

Offline PC5LeGeND

  • LV3 Member (Next: 100)
  • ***
  • Posts: 54
  • Rating: +0/-1
  • TI-84 asm programmer
    • View Profile
Re: External variables in axe parser
« Reply #26 on: May 31, 2012, 03:28:31 pm »
But what is the command to store in your appvar
TI-84/TI-83 ASM programmer

TI-84/TI-83 BASIC programmer

Java program





Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: External variables in axe parser
« Reply #27 on: May 31, 2012, 03:34:02 pm »
But what is the command to store in your appvar
There is no such thing. You just write a value to an adress. Like this:
Code: [Select]
GetCalc("appvTEST",2)->A //A is the pointer to your appvar now!
10->{A} //stores 10 in appvar TEST
21->{A+1} // stores 21 in appvar TEST
disp{A}>Dec //Displays 10 in this case
disp{A+1}>Dec //Displays 21 in this case
« Last Edit: May 31, 2012, 03:34:37 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: External variables in axe parser
« Reply #28 on: May 31, 2012, 03:36:02 pm »
Code: [Select]
GetCalc("appvNAME",[size of data you need])->A     //appvar NAME is created with the amount of data you need and stored to pointer A.
Copy([your data],A,[size of your data])                  //Copy's the size of your data from your data into pointer A (appvar NAME)

EDIT: :ninja:
« Last Edit: May 31, 2012, 03:36:21 pm by parser padwan »

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: External variables in axe parser
« Reply #29 on: May 31, 2012, 06:59:37 pm »
Code: [Select]
GetCalc("appvNAME",[size of data you need])->A     //appvar NAME is created with the amount of data you need and stored to pointer A.
Copy([your data],A,[size of your data])                  //Copy's the size of your data from your data into pointer A (appvar NAME)

EDIT: :ninja:
For a level editor it might be better to copy the level data to free ram and copy it back to the appvar, indeed, so that you don't end up destroying the level without a spare save file.
« Last Edit: May 31, 2012, 07:00:20 pm by Keoni29 »
If you like my work: why not give me an internet?