Author Topic: Programs written with an Axe program  (Read 15688 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Programs written with an Axe program
« Reply #15 on: December 10, 2010, 12:39:42 pm »
oh. nevermind, Axe can handle them now, so be happy! (like me, its my 15th birthday!! :w00t: )

Congratulations, you keep on telling that to everybody xD

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: Programs written with an Axe program
« Reply #16 on: December 10, 2010, 01:51:45 pm »
Happy birthdfay!  have a big slice of CAKE:

anyway, so the {^T} is the token prefix?  then how would you add something like "A+1->A"?

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 aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Programs written with an Axe program
« Reply #17 on: December 10, 2010, 01:54:16 pm »
using a string then copy

i want to know how to add quotes ( " [alpha][ +] ) and sto> symbol

« Last Edit: December 10, 2010, 01:54:41 pm by aeTIos »
I'm not a nerd but I pretend:

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: Programs written with an Axe program
« Reply #18 on: December 10, 2010, 02:14:33 pm »
All the tokens are listed here: http://tibasicdev.wikidot.com/tokens

You'll have to store the hex yourself, though.




Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Programs written with an Axe program
« Reply #19 on: December 10, 2010, 02:17:43 pm »
All the tokens are listed here: http://tibasicdev.wikidot.com/tokens

You'll have to store the hex yourself, though.


I would use this token file:

http://brandonw.net/calcstuff/ti83plus.txt

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Programs written with an Axe program
« Reply #20 on: December 10, 2010, 02:20:59 pm »
i wont use a token file :P
in axe, you can store tokens using T(token here)-> {location of token}
so, in case of an quote it woud be T" -> {P+2}

Edit:
yay, finally got a very simple Basic program working!
code:
Code: [Select]
Getcalc("prgmTEST",20)->P
[suprscrpt] T [/supr]Disp->{P}
[sup]T[/sup]"->{P+1}
"I"->Str1
Copy(Str1,P+2,3)
[sup]T[sup]"->{P+3}

It just displays an I on the homescreen, but it works!!
Yay, i discovered something really cool!! :w00t:
Comments?
Post!
« Last Edit: December 10, 2010, 02:42:12 pm by aeTIos »
I'm not a nerd but I pretend:

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: Programs written with an Axe program
« Reply #21 on: December 10, 2010, 05:17:41 pm »
Optimized:
Code: [Select]
GetCalc("prgmTest",4)->P
tDisp->{P
t"->{P+1
"I"->Str1
Copy(Str1,P+2,3
t"->{P+3
[code]

just some brackets + the program is only 4 bytes, not 20 (name excluded)
[/code]
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Programs written with an Axe program
« Reply #22 on: December 10, 2010, 05:19:25 pm »
Code: [Select]
Copy(Data(tDisp,t",'I',t")),GetCalc("prgmTEST",4),4)
« Last Edit: December 10, 2010, 05:20:28 pm by nemo »


Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Programs written with an Axe program
« Reply #23 on: December 11, 2010, 01:41:05 am »
O.O thats a much optimizing, nemo!
I'm not a nerd but I pretend:

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: Programs written with an Axe program
« Reply #24 on: December 11, 2010, 01:44:48 am »
Lol nice, I didn't knew Getcalc could be used that way. ;D

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Programs written with an Axe program
« Reply #25 on: December 11, 2010, 06:37:31 am »
I wouldn't recommend using it that way because the routine can fail.  If there were not enough memory to create the program, the pointer would be null and trying to copy data to the zero address would result in a crash.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Programs written with an Axe program
« Reply #26 on: December 11, 2010, 06:54:14 am »
ah, okay. so not copy(A,getcalc(""prgmB",8)
but
Getcalc("prgmB",8)->P
check for enough ram
copy(data to program

am I right??
I'm not a nerd but I pretend:

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Programs written with an Axe program
« Reply #27 on: December 11, 2010, 07:05:05 am »
Yeah, something like that. But I'm really only talking about for a 'public' release.  The odds of having less than 15ish bytes left on your calculator is probably very rare.  Any triple digit of bytes is rare for me at least.  If you're just doing this to quickly test out the features or to generate a file like from a map editor then you really don't need the error checking since you're aware of the problem and know how to avoid it.  Its only if other people use your program that you would want to check for errors.
« Last Edit: December 11, 2010, 07:33:29 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Programs written with an Axe program
« Reply #28 on: December 11, 2010, 07:13:24 am »
^thats clear.
is there any way for easier storing tokens into strings??
like
Code: [Select]
Data(tDisp t")->str1
"I"->str1+2
Data(t")->str1+3
copy(str1,P,length(str1)
does this work?
I'm not a nerd but I pretend:

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Programs written with an Axe program
« Reply #29 on: December 11, 2010, 07:32:40 am »
The easiest way *not available until the next version* is to absorb them directly into the program.

Recall that when you have a title screen that takes up the whole screen, you don't want to have to type out the entire 1536 hex characters:
[123ABC...]

Instead, you can absorb an OS picture into the program simply by doing this:
[Pic1]

The same thing applies for tokens.  If you want a string of tokens, then instead of doing:
Data(t1,t2,t3,tA,tB,tC,...)

You can do any of these:
[Ans]
[Str1]
[prgmABC]
[appvABC]


And the data will be directly absorbed into the program, depending on where you have your tokens stored (The one with Ans is kinda volatile, I wouldn't recommend that).  To find the length of some data of unknown size, you can't use length() because its not necessarily zero terminated, and you shouldn't use it anyway since its a slow routine and you already know the pointers are static.  Instead you can just subtract the start from the end of the data pointer.

:[Str1]->Str1
:[]->Str1E
:Copy(Str1,L1,Str1E-Str1)
___Axe_Parser___
Today the calculator, tomorrow the world!