0 Members and 1 Guest are viewing this topic.
DW AXM_HEADER;This tells Axe that this is an axiom;these name can be found by pressing 2nd + catalog and opening AXEDW DispHLEnd;sets the sizeDB AXM_ALL;It works for all compile typesDB $27,$00;It will be the token fMin( found under mathDB AXM_INLINE;It is inlineDB AXM_1ARG;1 argument, A number in this caseRORG 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 codeDW $00;The end of the axiomDW hFmin;which token to replaceDB 6;the replacement is 6 characters longDB "DispHL";thats all!
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
;#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 _DrawRectBorderClearDrawRectBorderEnd: dw 0 dw hDF db 15 db "DrawRectBorder(";#IMPORT "OS115Equ";#IMPORT "TOKENHOO";#IMPORT "AXE"
.AA#Axiom(TESTAXM)ClrHomeClrDraw[sup]r[/sup][sup]r[/sup]DrawRectBorder(10,10,20,20)DispGraphPause 1800
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 _DrawRectBorderClearDrawRectBorderEnd: 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)DispGraphPause 1800Axe 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