Author Topic: How to create an Axiom with Mimas  (Read 586 times)

0 Members and 1 Guest are viewing this topic.

Offline E37

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +11/-0
  • I own two game consoles- a ti- 83 and a ti- 84!
    • View Profile
How to create an Axiom with Mimas
« on: September 02, 2016, 07:01:26 pm »
Several people (myself included) have posted about using Mimas to create Axioms.
I decided to write a tutorial on how to create an axiom using Mimas.

Getting set up:
Download Axe. Open it up and find the files called TokenHook.inc and Axe.inc.
Download Mimas. Open it up and find the file asmTo8xv.exe.
Drag both files one at a time over asmTo8xv. They might need to be in the folder for it to work.
That should create the files TOKENHOO.8xv and AXE.8xv
Send TOKENHOO.8xv and AXE.8xv to your calc.
(If you don't already have Mimas and Axe this probably isn't for you)

Create a new program IN MIMAS. Whatever you name it, DON'T name it the same thing as what your axiom is going to be called.
Open the menu for that program and chose 'Libraries'. Add both TOKENHOO and AXE.
Now you are ready to start programming!
If you are unfamiliar with the Axiom format, Axe has a file on it in the 'Developers' folder.

Here is some example code, with descriptions:
Code: [Select]
DW AXM_HEADER
;This tells Axe that this is an axiom
;these name can be found by pressing 2nd + catalog and opening AXE
DW DispHLEnd
;sets the size
DB AXM_ALL
;It works for all compile types
DB $27,$00
;It will be the token fMin( found under math
DB AXM_INLINE
;It is inline
DB AXM_1ARG
;1 argument, A number in this case
RORG 0
;This is the start of the axiom's code!
BCALL DispHL
;The argument is already in HL. All we have to do is display it!
DispHLEnd:
;End of this command's code
DW $00
;The end of the axiom
DW hFmin
;which token to replace
DB 6
;the replacement is 6 characters long
DB "DispHL"
;thats all!
Now to compile!
Before compiling choose your axiom's name. It MUST be different from the code's name or it WON'T WORK!
Create a program in a include your axiom.
Compile once with Axe to convert the axiom to an appv.
Once you open you program (not the Mimas one!) the token replacements should show up. (if you made any)
If it just displays one empty line, your token repalcement was bad. Pull the batteries and try again.
You should have successfully created an axiom with Mimas!
« Last Edit: September 06, 2016, 05:32:43 pm by E37 »
Good things come in bags marked "SWAG"

Offline neuronix

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 103
  • Rating: +0/-0
    • View Profile
Re: How to create an Axiom with Mimas
« Reply #1 on: September 06, 2016, 02:09:12 pm »
I would create an axiom with mimas, so I copied your code, and I compile with an other name of code's name.
Then I create an Axe program with include my axiom.
After, I compiled the program and the token is replaced. But, when I would like use this function so I put the function DispHL in the code.
When I compiled the code, he says me "Invalid Token" and when I press [prgm], I put me at the DispHL line.
How I can removed this error?
Thank you in advance

Offline E37

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +11/-0
  • I own two game consoles- a ti- 83 and a ti- 84!
    • View Profile
Re: How to create an Axiom with Mimas
« Reply #2 on: September 06, 2016, 05:31:59 pm »
I would create an axiom with mimas, so I copied your code, and I compile with an other name of code's name.
Then I create an Axe program with include my axiom.
After, I compiled the program and the token is replaced. But, when I would like use this function so I put the function DispHL in the code.
When I compiled the code, he says me "Invalid Token" and when I press [prgm], I put me at the DispHL line.
How I can removed this error?
Thank you in advance
I'm sorry, I put the wrong tokenhook in my example.
It should be "DB hFmin"
You will notice that replacing DispHL with Fmax( in your code should work fine.
Ill fix my example.
Good things come in bags marked "SWAG"

Offline neuronix

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 103
  • Rating: +0/-0
    • View Profile
Re: How to create an Axiom with Mimas
« Reply #3 on: September 07, 2016, 11:04:23 am »
Thanks.
And I would create an axiom to draw rect border.
This is my code:
Code: [Select]
;#SECTION "MAIN", CODE

dw AXM_HEADER
dw DrawRectBorderEnd
db AXM_ALL
dw hDF / 2
db AXM_INLINE
db AXM_4ARGS
rorg 0
pop af
ld l, a
pop af
ld h, a
pop af
ld e, a
pop af
ld d, a
B_CALL _DrawRectBorderClear
DrawRectBorderEnd:
dw 0
dw hDF
db 15
db "DrawRectBorder("
;#IMPORT "OS115Equ"
;#IMPORT "TOKENHOO"
;#IMPORT "AXE"
Then, I compile this code with mimas to a program with an other name.
After, I create a program that include my axiom and I compile this program.
But, when I used the replace token, with this code:
Code: [Select]
.AA
#Axiom(TESTAXM)
ClrHomeClrDraw[sup]r[/sup][sup]r[/sup]
DrawRectBorder(10,10,20,20)
DispGraph
Pause 1800
Axe Parser apps says me INVALID TOKEN.
If I press prgm to go to the error line, he puts me at the 10:
DrawRectBorder(10,10,20,20)
Help me please

Offline E37

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +11/-0
  • I own two game consoles- a ti- 83 and a ti- 84!
    • View Profile
Re: How to create an Axiom with Mimas
« Reply #4 on: September 07, 2016, 06:27:39 pm »
Thanks.
And I would create an axiom to draw rect border.
This is my code:
Code: [Select]
;#SECTION "MAIN", CODE

dw AXM_HEADER
dw DrawRectBorderEnd
db AXM_ALL
dw hDF / 2
db AXM_INLINE
db AXM_4ARGS
rorg 0
pop af
ld l, a
pop af
ld h, a
pop af
ld e, a
pop af
ld d, a
B_CALL _DrawRectBorderClear
DrawRectBorderEnd:
dw 0
dw hDF
db 15
db "DrawRectBorder("
;#IMPORT "OS115Equ"
;#IMPORT "TOKENHOO"
;#IMPORT "AXE"
Then, I compile this code with mimas to a program with an other name.
After, I create a program that include my axiom and I compile this program.
But, when I used the replace token, with this code:
Code: [Select]
.AA
#Axiom(TESTAXM)
ClrHomeClrDraw[sup]r[/sup][sup]r[/sup]
DrawRectBorder(10,10,20,20)
DispGraph
Pause 1800
Axe Parser apps says me INVALID TOKEN.
If I press prgm to go to the error line, he puts me at the 10:
DrawRectBorder(10,10,20,20)
Help me pleased
That means the command is wrong.
Dw hUF / 2
Is where your error is.
Have you read the file to create axioms?
You only need 3 pops. Each comma is the same as push hl.
Good things come in bags marked "SWAG"