Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Binder News on May 19, 2011, 06:39:45 pm

Title: What is wrong with my Axiom?
Post by: Binder News on May 19, 2011, 06:39:45 pm
I've been working on an Axiom for an even faster version of the getKey routine, but specific to the 4 arrow keys.
However, whenever I try to use it, it says it's a bad Axiom. What am I doing wrong?
Here's the source:
Code: [Select]
.nolist
#include "Axe.inc"
#include "ti83plus.inc"
.list

.dw AXM_HEADER

.dw Ax1_End
.db AXM_ALL
.db tGetKey, 0
.db AXM_RRMOD
.db 0
.org 0
LD     A, %11111110
    OUT    (1), A
    ld hl,0
    IN     A, (1)
    CP     0
    jr z,Ax1_End
    inc l
    bit 0,a ;down
    jr z,Ax1_End
    inc l
    bit 1,a ;left
    jr z,Ax1_End
    inc l
    bit 2,a ;right
    jr z,Ax1_End
    inc l ;up
Ax1_End:

.dw $0000
Title: Re: What is wrong with my Axiom?
Post by: Quigibo on May 19, 2011, 07:01:31 pm
1) By the looks of your code, you are using SPASM right?  TASM doesn't hande the .org statement correctly so that wouldn't work.
2) If compiled to a program, it must be in RAM so that Axe can convert it to an appvar for you.
3) You cannot use tGetkey as your token since Axe already uses this, regardless of the rr modifier.

Everything else looks correct though...
Title: Re: What is wrong with my Axiom?
Post by: Binder News on May 19, 2011, 07:03:28 pm
Yes, I'm using spasm, I'll keep the must be in ram thing in mind, and what token should I use then?
Title: Re: What is wrong with my Axiom?
Post by: Compynerd255 on May 19, 2011, 07:09:09 pm
Use the gcd( token (Greatest Common Denominator, found in MATH, RIGHT, 9).

Also, out of curiosity, how far down "ti83plus.inc" are the token equates defined? I can never find them.
Title: Re: What is wrong with my Axiom?
Post by: Binder News on May 19, 2011, 07:09:46 pm
In mine, at the very bottom.

EDIT: I decided to go with ZoomIn
Title: Re: What is wrong with my Axiom?
Post by: Quigibo on May 19, 2011, 07:10:07 pm
Yes, I'm using spasm, I'll keep the must be in ram thing in mind, and what token should I use then?

Any unused token is fine, I definitely recommend tokens on the [vars] "Zoom..." menu when possible since those are guaranteed no to used by Axe in any future update.  Also, only the initial program has to be in ram.  Once its converted to an appvar, it can be in ram or archive.  You could bypass the conversion yourself actually if you change one of the bytes in the 8xp file, but that's more complicated.
Title: Re: What is wrong with my Axiom?
Post by: Binder News on May 19, 2011, 07:12:36 pm
I know. I've actually written .8xp writers in a couple of different languages.

EDIT: Yay, got it to work. Thanks.