Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Runer112 on March 12, 2015, 11:32:35 pm

Title: Axe Library, Axiom, and Tool Collection
Post by: Runer112 on March 12, 2015, 11:32:35 pm
Axe Libraries

2D
Grayscale
UI
Math
OS Interfacing

Axioms

2D
3D
External Interfacing
Hardware
Math
OS Interfacing
Source Management
UI

On-Calc Tools

Spriting
Utility

Off-Calc Tools

Emulation
IDE
Spriting





If you believe any library, Axiom, or tool should be added to this list, let me know.
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: pimathbrainiac on March 13, 2015, 08:30:19 am
I made an 8 level library awhile ago http://www.omnimaga.org/ti-z80-calculator-projects/g8lib-8-level-grayscale-lib-for-axe!/
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Jsec42 on September 04, 2015, 09:12:42 am
I think my L1 stacklib function has a place here, as it can be useful for declaring local variables :)
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Eeems on September 04, 2015, 12:25:44 pm
I think my L1 stacklib function has a place here, as it can be useful for declaring local variables :)
Mind giving some information on it's usage or a link to another place where you do?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Jsec42 on September 05, 2015, 10:56:45 am
Oh of course. It has two functions, PUSH and POP
<Code>
PUSH(Stack Address, Value to push)
POP(Stack Address, Variable)
</Code>
I should also note that POP requires the variable to be passed by refrence
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on November 26, 2015, 03:27:49 pm
I do not manage to send TileIT! to my calculator.  :-\
Could anybody help me?
Thank you in advance
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Eeems on November 26, 2015, 08:53:21 pm
I do not manage to send TileIT! to my calculator.  :-\
Could anybody help me?
Thank you in advance
You are going to need to give more information then that for anybody to help you. What type of calculator? What software are you using to send it? What operating system? What is the error that you are getting?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on November 27, 2015, 07:31:10 am
my calculator is a TI 84+, I use TI Connect CE.
It says me 'Il semble que la connexion avec l'unité se soit arrêté. Veuillez réessayer'
Thank you in advance
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 25, 2016, 07:19:03 am
I would like create an axiom for TI 84+ SE but when I build my code, and I transfer the program on my calculator, I execute the progra and the calculator says me "Error: Version" :(
I don't understand :(
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Runer112 on June 25, 2016, 10:11:25 am
I would like create an axiom for TI 84+ SE but when I build my code, and I transfer the program on my calculator, I execute the progra and the calculator says me "Error: Version" :(
I don't understand :(

Can you elaborate? Because I'm not sure I'm understanding the situation correctly. It sounds like you're executing the axiom as a program, but that doesn't really make sense.
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 28, 2016, 10:12:32 am
I would like create an Axiom with Mimas but my Axiom don't work when I launch one :(
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Runer112 on June 28, 2016, 04:28:13 pm
I would like create an Axiom with Mimas but my Axiom don't work when I launch one :(

What doesn't work? It still sounds like you're trying to execute the Axiom, which as I mentioned in my last reply, doesn't make sense. It's a library, not an executable.
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on June 29, 2016, 09:10:03 am
I haven't had any luck with creating axioms with mimas for a couple reasons.
1. Axe reads axioms as an appv it looks at the appv list for an axiom, so it sees mimas's file that HAS THE SAME NAME as the axiom (it is the source code) Axe tries to read the mimas source code as an axiom so it fails. I converted the compiled code into an appv (with a slightly different name) to avoid that problem.
2. For some other reason it just won't work. I made an axiom on mimas and the EXACT SAME code on TASM (with the difference in org and rorg) and the TASM code worked but the mimas failed.
Anyway you look at it the axiom should be an appv.
If you give me a little bit I can compare the compiled code from both to try to find the difference. I know it is possible as here: https://www.cemetech.net/forum/viewtopic.php?t=8159 matrefeytontias shows he can create an axiom using mimas, so it must be possible. (unless mimas updated since then and something broke)
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 29, 2016, 09:46:23 am
This is my code:
Code: [Select]
;#SECTION "MAIN", CODE

dw AXM_HEADER
; Debut Routine
dw EndAxiomRoutine + 6
db AXM_ALL
db hRound, 0
db AXM_INLINE
db 1
org 0
B_CALL _OP1Set0
B_CALL _Cos
B_CALL _ConvOP1
ex de, hl
ld d, h
ld b, h
ld e, l
ld c, l
ret

EndAxiomRoutine:
dw hRound
db 5
db "cos0("
;#IMPORT "TOKENHOO"
;#IMPORT "AXE"
It doesn't work :(
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 29, 2016, 09:52:34 am
This is my code with modifications:
Code: [Select]
;#SECTION "MAIN", CODE

dw AXM_HEADER
; Debut Routine
dw EndAxiomRoutine
db AXM_ALL
db hRound, 0
db AXM_INLINE
db 1
rorg 0
B_CALL _OP1Set0
B_CALL _Cos
B_CALL _ConvOP1
ex de, hl
ld d, h
ld b, h
ld e, l
ld c, l
ret

EndAxiomRoutine:
dw hRound
db 5
db "cos0("
;#IMPORT "TOKENHOO"
;#IMPORT "AXE"
It doesn't work too :(
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on June 29, 2016, 09:59:34 am
This is my code:
Code: [Select]
;#SECTION "MAIN", CODE

dw AXM_HEADER
; Debut Routine
dw EndAxiomRoutine + 6
db AXM_ALL
db hRound, 0
db AXM_INLINE
db 1
org 0
B_CALL _OP1Set0
B_CALL _Cos
B_CALL _ConvOP1
ex de, hl
ld d, h
ld b, h
ld e, l
ld c, l
ret

EndAxiomRoutine:
dw hRound
db 5
db "cos0("
;#IMPORT "TOKENHOO"
;#IMPORT "AXE"
It doesn't work :(
First, to include a library in mimas, you go to the program's menu and select library and pick "AXE" and "TOKENHOO" and that will work the same way as #IMPORT
;You need to use rorg instead of org.
It is inline so you shouldn't use ret unless you want the program to return each time you use the code.
Right after EndAxiomRoutine you need to have dw 0 to signal the end of the axiom and the beginning of the replacements.
;You don't need the +6 in the declaration of the size you can just put "dw EndAxiomRoutine"
You should probably focus on the actual axiom before the custom replacements (save the replacements for later)
Is the compiled axiom an appv? It needs to be separate from the mimas source code file!
I hope that helps!
Oops I missed this:
You need the dw $C0DE as the first line of code (note the 0 instead of an O)
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 29, 2016, 10:06:51 am
This is the new code, is it correct ? :
Code: [Select]
;#SECTION "MAIN", CODE

dw $C0DE
; Debut Routine
dw EndAxiomRoutine
db AXM_ALL
db hRound, 0
db AXM_INLINE
db 1
rorg 0
B_CALL _OP1Set0
B_CALL _Cos
B_CALL _ConvOP1
ex de, hl
ld d, h
ld b, h
ld e, l
ld c, l

EndAxiomRoutine:
        dw 0
dw hRound
db 5
db "cos0("
;#IMPORT "TOKENHOO"
;#IMPORT "AXE"
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on June 29, 2016, 10:10:27 am
This is the new code, is it correct ? :
Code: [Select]
;#SECTION "MAIN", CODE

dw $C0DE
; Debut Routine
dw EndAxiomRoutine
db AXM_ALL
db hRound, 0
db AXM_INLINE
db 1
rorg 0
B_CALL _OP1Set0
B_CALL _Cos
B_CALL _ConvOP1
ex de, hl
ld d, h
ld b, h
ld e, l
ld c, l

EndAxiomRoutine:
        dw 0
dw hRound
db 5
db "cos0("
;#IMPORT "TOKENHOO"
;#IMPORT "AXE"
I don't see anything wrong in the code.
Wait, yes I do. The token in the header whould be dw tRound instead of dw hRound,0
Is it an appv in ram or flash?
Are the includes correct? (you don't need them but they just let you use constants like hRound)
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 29, 2016, 10:15:59 am
And how can I do to return any value in ans?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on June 29, 2016, 10:20:01 am
And how can I do to return any value in ans?
Like in Axe's ans?
Axe's ans is just hl.
"ld hl,5" would set 5 into axe's ans.
Let's pretend that is all the axiom does and it is the token Boxplot and is represented "five" in the custom replacement
you could do:
:.DEMO
:#Axiom(AXIOM)
:five -> A
and A would hold five
I also THINK you can: ":A -> five" and it will store the value of A to the location 5 in ram. (same as ":a -> {5}")
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 29, 2016, 10:22:20 am
And to Axe conert the program to an appvar, I insert axiom in code with #Axiom(prgmNOM) or #Axiom(NOM)?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on June 29, 2016, 10:23:23 am
Axe converts it if the appv doesn't already exist.
You would use #Axiom(AXMNAME) without any prefexes.
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on June 30, 2016, 10:09:26 am
And where I can download the GUI Axiom?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on September 07, 2016, 12:33:54 pm
I would like to send tileIt! to my calculator but when I send tileIt! 2.0 with TI Connect CE, my TI-84+SE crash and I have a beautiful Ram Cleard.
But if I send tileIt! 1.0, it works :(
Help me please  :'(
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Sorunome on September 11, 2016, 03:46:33 pm
Have you tried tilp yet?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on September 11, 2016, 07:34:17 pm
I would like to send tileIt! to my calculator but when I send tileIt! 2.0 with TI Connect CE, my TI-84+SE crash and I have a beautiful Ram Cleard.
But if I send tileIt! 1.0, it works :(
Help me please  :'(
I sent the source code over and compiled it on calc.
Almost always I clear my ram before sending a file.
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on September 14, 2016, 12:39:01 pm
Yes, it works, but I would like to know why?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on September 14, 2016, 04:27:46 pm
Yes, it works, but I would like to know why?
The ram clear or sending the source code and compiling?
I don't really know why either work but I have some guesses.
The ram clear can remove any corrupt data. Compiling? I don't really know.
If your calc has a lot of trouble sending/receiving files, back up all your data and reset all your memory.
That helps for me.  :-\
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on September 15, 2016, 12:43:12 pm
Ok, thank you for this response
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on September 17, 2016, 07:23:28 pm
I have an addition to made (or at least reference)
I made the axiom STAXM which is really simple.
It allows the user to pop and push variables just like assembly.
Here's some example code:
Code: [Select]
:.TEST
:#Axiom(STAXM)
:L1->(SP)
:5->A
:Push °A
:rand->A
:Pop °A
:Disp A>Dec
... which will display 5 for the value of A.
All three tokens are found under math.
Spoiler For Spoiler:
A couple things of note:
(SP) is a token under math and is the same as Y6t (you change one you change the other)
(SP) is the current location of the stack set it to control where the stack starts. (:Pop °GARBAGE is the same as :(SP)-2->(SP))

Title: Re: Axe Library, Axiom, and Tool Collection
Post by: Sorunome on September 18, 2016, 02:51:52 am
Sounds useful!
Do you use a custom stack or do you use the normal cpu stack (so that you need to push/pop correctly before returning)?
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: E37 on September 18, 2016, 09:36:51 am
Sounds useful!
Do you use a custom stack or do you use the normal cpu stack (so that you need to push/pop correctly before returning)?
It uses a custom stack. (SP) like in assembly is where the current end of the stack is. I often use L4 for the stack.
Title: Re: Axe Library, Axiom, and Tool Collection
Post by: neuronix on September 20, 2016, 07:21:49 am
Good job E37  ;)