Author Topic: Axe Q&A  (Read 503240 times)

0 Members and 2 Guests are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #150 on: March 13, 2011, 01:06:48 am »
A few things can cause the bad axiom error. My first guess would be that what you put in the #Axiom() statement is causing the problem. What you enter inside that has to be the name of the axiom as it is present on the calculator, with correct capitalization and without a prefix like "appv". For instance, for the already compiled version of MemKit that was distributed in the Axe 0.5.0 zip file, you would use #Axiom(MemKit). The only other thing I can think of is that the axiom wasn't compiled correctly. If my first suggestion as to what the error could be isn't the problem, if you post the program your compiler produced I can check the second possible problem.
« Last Edit: March 13, 2011, 01:08:06 am by Runer112 »

Offline NinjaKnight

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +2/-0
  • Hey! Look behind you! It's a -- (runs)
    • View Profile
Re: Axe Q&A
« Reply #151 on: March 14, 2011, 09:04:24 pm »
How would I use inData to look up a getKey value? I tried to do something like

inData(getKey,Data(1,2,3,4,etc))

but it returns random values for anything not in Data(.
Ninja vs. Chuck Norris == n/0. Both end with the world blowing up.

"We could use up two eternities in learning all that is to be learned about our own world and the thousands of nations that have arisen and flourished and vanished from it. Mathematics alone would occupy me eight million years."
-Mark Twain

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: Axe Q&A
« Reply #152 on: March 14, 2011, 09:07:26 pm »
Try this: http://ourl.ca/4129/114828
I hope it helps. :)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #153 on: March 14, 2011, 09:13:59 pm »
You would want to do something like the following:

inData(getKey+1,Data(KEYCODE+1,ANOTHER_KEYCODE+1,ETC+1,0))

The inData() relies on a value of zero to specify the end of the data to search. Without a specified end of the data to search, the routine would just keep searching all of RAM until it finds the value, which is probably not what you want. This is why I added a 0 as the final byte of data. And because zero is used to specify the end, having zeros anywhere else would cause problems. This is why I then appended +1's to getKey and to all the keycodes you want to search for, so the value to search for or the match value will never be zero.


EDIT: I'll look at the inData() routine though and see if there's a way to avoid this necessity of adding 1s, so maybe with a future release of Axe you won't have to worry about it. But you'll always need the final data byte to be a 0.
« Last Edit: March 14, 2011, 09:15:50 pm by Runer112 »

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Axe Q&A
« Reply #154 on: March 16, 2011, 03:15:39 pm »
You could also do something like..
Code: [Select]
If getKey
inData(,Data(stuff,0))->wherever
End
A bit easier to deal with, but idk how optimized it is

Edit: I think it may be a couple of bytes larger :P. Oh well.
« Last Edit: March 16, 2011, 03:18:38 pm by squidgetx »

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #155 on: March 17, 2011, 06:13:15 pm »
How can I use archive variables in the form of a file  (note that when I am done, it will be about 30k bytes large, so don't say unarchive it... :P)

I am currently using, for a different prgm...
Code: [Select]
:!If getcalc("appvarSPREDIT",Y1)
:Return
:End
...
:Copy(Y1+C,L1,64)
:For(F,0,3)
:Pt-On(F^2*8,F/2*8,F*8+L1)
:Pt-On(F^2*8,F/2*8,F*8+L1+32)r
:End
:DispGraphrr
I would like to remove the Copy( part of it though.
Any ideas?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

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: Axe Q&A
« Reply #156 on: March 17, 2011, 08:59:26 pm »
Well, you can't edit it while it's in the archive, that's for sure.

As for reading, I may be completely off on this, but does {Y1} not work? A "file" in Axe is really just a pointer to the archived location (with the page switched).

But if that program is 30 KB large, you might still run into problems if it's in the archive. The archive is split into 16-KB pages, and you can't access two pages at a time; if you need to access data that goes beyond a page, you need to switch to that page. I don't know how Axe does this, or if it switches pages for you at all, so you'd definitely have problems working with something that large. Any chance you could use smaller chunks?
« Last Edit: March 17, 2011, 09:00:27 pm by Deep Thought »




Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #157 on: March 17, 2011, 09:15:35 pm »
The documentations says I can.
I probably will have the total size be under 20K But I still am unsure.
I could separate into chucks yes, but preferably not.  It doesn't make a diff at this point.

{Y1} works completly...
The problem is that I am using a drawing command
Pt-on(_,_,_)   can better be described  Pt-on(_,_,{_})
Since the {} is implied in the command, it would look like this {F*8+C+{Y1}}
If I were to use Pt-on(_,_, F*8+C+Y1)  It throws an error about filetype misuse.
Sorry if I am not clear.

Edit: would this be coincided a bug?
« Last Edit: March 17, 2011, 09:18:22 pm by Happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

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: Axe Q&A
« Reply #158 on: March 17, 2011, 09:21:52 pm »
Pt-on(_,_,_)   can better be described  Pt-on(_,_,{_})
Since the {} is implied in the command, it would look like this {F*8+C+{Y1}}
If I were to use Pt-on(_,_, F*8+C+Y1)  It throws an error about filetype misuse.

Just to clear something else up: {} is never optional. PTR returns an address (a number), while {PTR} returns the byte stored at the address. Pt-On( always takes an address as an argument.

Anyway, about your problem, Pt-on(X,Y,F*8+C+{Y1}) seems to work fine?




Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #159 on: March 17, 2011, 09:26:06 pm »
* Happybobjr curses as he tries it.

Caused an instant ram clear when run.

Edit: Did you try it on calc
« Last Edit: March 17, 2011, 09:27:26 pm by Happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

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: Axe Q&A
« Reply #160 on: March 17, 2011, 09:34:20 pm »
* Happybobjr curses as he tries it.

Caused an instant ram clear when run.

Edit: Did you try it on calc

Whoops, I didn't actually try running it, sorry.

Wait, is the sprite itself stored in Y1? If so why would you put braces around it?

But apparently if you take the braces off it gives you a file misuse error... I think that would count as a bug :)




Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #161 on: March 17, 2011, 09:38:53 pm »
oh, ok.  thank you for your help.
If it would have been in my ram (Y1)  I would be screwed in losing all my data :/
But i suppose the whole point of this was that it wasn't in my ram :P.

School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Axe Q&A
« Reply #162 on: March 18, 2011, 07:17:57 am »
You can't use files in sprite commands. You'd best stick with copying to L1 for now :P

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #163 on: March 18, 2011, 07:20:03 am »
I's just wondering, but when I tried to create appvar, there was something else called "u" created too along with my appvar "MYAPPVAR". When I tried to delete that "u", it caused instant calc reset. What is happening?
Sig wipe!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #164 on: March 18, 2011, 08:45:37 am »
lol you screwed up something in RAM, that 'u' is the 'u' token (2nd 7). its an equation variable, you can access it via mode-> seq (the graphing mode)
this happens very often when you screw something up by creating appvars/ using strings. just dont do anything with it, or delete them and watch your calc crashing :)
I'm not a nerd but I pretend: