;#################################
;# To Axe Programmers #
;#############################################################################################
;# #
;# This file lists the size and speed of all of Axe's commands. It also has notes to clarify #
;# details about commands, and has examples to show exactly what source code would #
;# correspond to the compiled commands detailed in this file. Most of the command names are #
;# taken from the Commands.inc file inlcuded in Axe releases, and some may be slightly #
;# cryptic. If you are unsure what the name means, just look at the example code given, and #
;# that should demonstrate what Axe source code corresponds to that command. And if you #
;# can't find something listed here, then it's not actually a command and takes up no size. #
;# #
;# Empty parentheses, brackets, and arguments in the examples mean that, although you'll #
;# usually want to put something there, whatever you put there is not actually a part of the #
;# command. As such, the command sizes and speeds listed reflect the use of these commands #
;# without any arguments, because you can enter any arguments you want. The size and speed #
;# of arguments can be determined by the other entries listed in this file. #
;# #
;# Under the names of some commands are lines that specify information about calling the #
;# command. This means that the command is added as a subroutine and will only exist in your #
;# code once, but due to that, there will be some size and speed overhead necessary for #
;# calling the command. Some commands can also be called in more than one way. #
;# #
;# I suggest opening this file in a program like Notepad with a monospaced font like Lucidia #
;# Console, or else the formatting will make it look terrible. If this introduction isn't #
;# bordered by a rectangle, then you're not using a monospaced font. If the empty line that #
;# is two lines below this one is messing up the rectangle, then your tab width isn't 8 #
;# characters. This will probably make everything following not look all that great. #
;# #
;# Accurate as of Axe 0.5.3. #
;# #
;#############################################################################################
;_______________________________________________________________________________________________________________________;
;COMMAND NAME SIZE SPEED EXAMPLE EXAMPLE 2 NOTES ;
;_______________________________________________________________________________________________________________________;
;Headers
;-----------------------------------------------
p_AsmHeader: 2 bytes An assembly program compiled with no shell and no code (except for the mandated return) will be n+12 bytes; n=length of name
p_IonHeader: n+10 bytes n=length of description
p_MOSHeader: n+39 bytes n=length of description
p_DCSHeader: n+51 bytes n=length of description
p_APPHeader: 142 bytes
;Saving and loading numbers
;-----------------------------------------------
p_LoadConst: 3 bytes 10 cycles 1 ᴇ1337
p_LoadVar: 3 bytes 16 cycles A
p_Load1ByteConstPtr: 5 bytes 23 cycles {L₁}
p_Load2ByteConstPtr: 3 bytes 16 cycles {L₁}ʳ
p_Load2ByteConstPtrRev: 6 bytes 28 cycles {L₁}ʳʳ
p_Load1ByteExprPtr: 3 bytes 14 cycles {}
p_Load2ByteExprPtr: 4 bytes 24 cycles {}ʳ
p_Load2ByteExprPtrRev: 4 bytes 24 cycles {}ʳʳ
p_SaveVar: 3 bytes 16 cycles →A
p_Save1ByteConstPtr: 4 bytes 17 cycles →{L₁}
p_Save2ByteConstPtr: 3 bytes 16 cycles →{L₁}ʳ
p_Save2ByteConstPtrRev: 6 bytes 28 cycles →{L₁}ʳʳ
p_Save1ByteExprPtr: 3 byte 28 cycles →{}
p_Save2ByteExprPtr: 5 bytes 41 cycles →{}ʳ
p_Save2ByteExprPtrRev: 5 bytes 41 cycles →{}ʳʳ
;Optimized Math
;-----------------------------------------------
p_Add0: 0 bytes 0 cycles +0 **CRASHES DURING COMPILING** Results in no compiled code
p_Add1: 1 byte 6 cycles +1 Tied for the smallest way to change a value in Axe
p_Add2: 2 bytes 12 cycles +2
p_Add3: 3 bytes 18 cycles +3
p_Add254: 3 bytes 16 cycles +254
p_Add255: 2 bytes 10 cycles +255
p_Add256: 1 byte 4 cycles +256 The absolute smallest and fastest way to change a value in Axe
p_Add257: 2 bytes 10 cycles +257
p_Add258: 3 bytes 16 cycles +258
p_Add510: 4 bytes 20 cycles +510
p_Add511: 3 bytes 14 cycles +511
p_Add512: 2 bytes 8 cycles +512
p_Add513: 3 bytes 14 cycles +513
p_Add514: 4 bytes 20 cycles +514
p_Add767: 4 bytes 18 cycles +767
p_Add768: 3 bytes 12 cycles +768
p_Add769: 4 bytes 18 cycles +769
p_Add1024: 4 bytes 16 cycles +1024
p_Sub0: 0 bytes 0 cycles -0 **CRASHES DURING COMPILING** Results in no compiled code
p_Sub1: 1 byte 6 cycles -1 Tied for the smallest way to change a value in Axe
p_Sub2: 2 bytes 12 cycles -2
p_Sub3: 3 bytes 18 cycles -3
p_Sub254: 3 bytes 16 cycles -254
p_Sub255: 2 bytes 10 cycles -255
p_Sub256: 1 byte 4 cycles -256 Also the absolute smallest and fastest way to change a value in Axe
p_Sub257: 2 bytes 10 cycles -257
p_Sub258: 3 bytes 16 cycles -258
p_Sub510: 4 bytes 20 cycles -510
p_Sub511: 3 bytes 14 cycles -511
p_Sub512: 2 bytes 8 cycles -512
p_Sub513: 3 bytes 14 cycles -513
p_Sub514: 4 bytes 20 cycles -514
p_Sub767: 4 bytes 18 cycles -767
p_Sub768: 3 bytes 12 cycles -768
p_Sub769: 4 bytes 18 cycles -769
p_Sub1024: 4 bytes 16 cycles -1024
p_Mul0: 3 bytes 10 cycles *0 Same as loading the constant 0
p_Mul1: 0 bytes 0 cycles *1 **CRASHES DURING COMPILING** Results in no compiled code
p_MulN1: 6 bytes 24 cycles *⁻1 Same as p_IntNeg
p_Mul2: 1 byte 11 cycles *2 Tied for the smallest way to change a value in Axe
p_Mul3: 4 bytes 30 cycles *3
p_Mul4: 2 bytes 22 cycles *4
p_Mul5: 5 bytes 41 cycles *5
p_Mul6: 5 bytes 41 cycles *6
p_Mul7: 6 bytes 52 cycles *7
p_Mul8: 3 bytes 33 cycles *8
p_Mul9: 6 bytes 52 cycles *9
p_Mul10: 6 bytes 52 cycles *10
p_Mul12: 6 bytes 52 cycles *12
p_Mul16: 4 bytes 44 cycles *16
p_Mul32: 5 bytes 55 cycles *32
p_Mul64: 5 bytes 144 cycles *64
p_Mul128: 5 bytes 170 cycles *128
p_Mul255: 6 bytes 31 cycles *255
p_Mul256: 3 bytes 11 cycles *256
p_Mul257: 3 bytes 12 cycles *257
p_Mul258: 4 bytes 23 cycles *258
p_Mul260: 5 bytes 34 cycles *260
p_Mul264: 6 bytes 45 cycles *264
p_Mul512: 4 bytes 22 cycles *512
p_Mul513: 6 bytes 37 cycles *513
p_Mul514: 4 bytes 23 cycles *514
p_Mul516: 5 bytes 34 cycles *516
p_Mul520: 6 bytes 45 cycles *520
p_Mul768: 6 bytes 23 cycles *768
p_Mul1024: 5 bytes 33 cycles *1024
p_Mul1028: 5 bytes 34 cycles *1028
p_Mul1032: 6 bytes 45 cycles *1032
p_Mul2048: 6 bytes 44 cycles *2048
p_Mul2056: 6 bytes 45 cycles *2056
p_Mul4096: 5 bytes 290 cycles *4096
p_Mul8192: 5 bytes 314 cycles *8192
p_Mul16384: 5 bytes 338 cycles *16384
p_Mul32768: 6 bytes 24 cycles *32768
p_Mul65535: 6 bytes 24 cycles *65535 Same as p_MulN1
p_Div0: 3 bytes 10 cyces /0 Same as loading the constant 65535
p_Div1: 0 bytes 0 cycles /1 **CRASHES DURING COMPILING** Results in no compiled code
p_Div2: 4 bytes 16 cycles /2
p_Div10: 3 bytes ~1896 cycles /10 n*3+1878 cycles, n=number of set bits in result
p_Div128: 5 bytes 27 cycles /128
p_Div256: 3 bytes 11 cycles /256
p_Div512: 5 bytes 19 cycles /512
p_Div32768: 5 bytes 27 cycles /32768
p_SDiv0: 3 bytes 10 cyces //0 **NOT MATHEMATICALLY CORRECT** Same as loading the constant 65535
p_SDiv1: 0 bytes 0 cycles //1 **CRASHES DURING COMPILING** Results in no compiled code
p_SDiv2: 4 bytes 16 cycles //2
p_SDiv64: 6 bytes 38 cycles //64
p_SDiv128: 4 bytes 23 cycles //128
p_SDiv256: 5 bytes 20 cycles //256
p_SDiv512: 6 bytes 38 cycles //512
p_SDiv16384: 6 bytes 38 cycles //16384
p_SDiv32768: 3 bytes 26 cycles //32768
p_Mod1: 3 bytes 10 cyces ^1 Same as loading the constant 0
p_Mod2: 5 bytes 20 cycles ^2
p_Mod4: 6 bytes 22 cycles ^4
p_Mod8: 6 bytes 22 cycles ^8
p_Mod16: 6 bytes 22 cycles ^16
p_Mod32: 6 bytes 22 cycles ^32
p_Mod64: 6 bytes 22 cycles ^64
p_Mod128: 4 bytes 15 cycles ^128
p_Mod256: 2 bytes 7 cycles ^256
p_Mod512: 4 bytes 15 cycles ^512
p_Mod1024: 4 bytes 15 cycles ^1024
p_Mod2048: 4 bytes 15 cycles ^2048
p_Mod4096: 4 bytes 15 cycles ^4096
p_Mod8192: 4 bytes 15 cycles ^8192
p_Mod16384: 4 bytes 15 cycles ^16384
p_Mod32768: 2 bytes 8 cycles ^32768
p_Mod65535: 0 bytes 0 cycles ^65535 **CRASHES DURING COMPILING, MATHEMATICALLY INCORRECT** Results in no compiled code
p_EQN512: 9 bytes 44 cycles =⁻512
p_EQN256: 8 bytes 40 cycles =⁻256
p_EQN2: 8 bytes 40 cycles =⁻2
p_EQN1: 7 bytes 36 cycles =⁻1
p_EQ0: 7 bytes 36 cycles =0
p_EQ1: 7 bytes ~29 cycles =1 24 cycles if true, 34 cycles if false
p_EQ2: 8 bytes ~33 cycles =2 28 cycles if true, 38 cycles if false
p_EQ256: 8 bytes 40 cycles =256
p_EQ512: 9 bytes 44 cycles =512
p_NEN512: 9 bytes ~31 cycles ≠⁻512 33 cycles if true, 28 cycles if false
p_NEN256: 8 bytes ~27 cycles ≠⁻256 29 cycles if true, 24 cycles if false
p_NEN2: 8 bytes 40 cycles ≠⁻2
p_NEN1: 7 bytes 36 cycles ≠⁻1
p_NE0: 7 bytes ~23 cycles ≠0 25 cycles if true, 20 cycles if false
p_NE1: 8 bytes ~27 cycles ≠1 29 cycles if true, 24 cycles if false
p_NE2: 9 bytes ~31 cycles ≠2 33 cycles if true, 28 cycles if false
p_NE256: 8 bytes ~27 cycles ≠1 29 cycles if true, 24 cycles if false
p_NE512: 9 bytes ~31 cycles ≠2 33 cycles if true, 28 cycles if false
p_GE0: 3 bytes 10 cycles ≥0 Always true
p_GT65535: 3 bytes 10 cycles >65535 Always false
p_LE65535: 3 bytes 10 cycles ≤65535 Always true
p_LT0: 3 bytes 10 cycles <0 Always false
p_GE1: 7 bytes ~23 cycles ≥1 25 cycles if true, 20 cycles if false
p_GT0: 7 bytes ~23 cycles >0 25 cycles if true, 20 cycles if false
p_LE0: 7 bytes 36 cycles ≤0
p_LT1: 7 bytes 36 cycles <1
p_SGE0: 4 bytes 32 cycles ≥≥0
p_SLT0: 5 bytes 27 cycles <<0
p_GetBit0: 5 bytes 27 cycles ee0
p_GetBit1: 6 bytes 38 cycles ee1
p_GetBit2: 7 bytes 37 cycles ee2
p_GetBit3: 7 bytes 37 cycles ee3
p_GetBit4: 7 bytes 37 cycles ee4
p_GetBit5: 7 bytes 37 cycles ee5
p_GetBit6: 7 bytes 26 cycles ee6
p_GetBit7: 6 bytes 22 cycles ee7
p_GetBit8: 5 bytes 27 cycles ee8 e0
p_GetBit9: 6 bytes 38 cycles ee9 e1
p_GetBit10: 7 bytes 37 cycles ee10 e2
p_GetBit11: 7 bytes 37 cycles ee11 e3
p_GetBit12: 7 bytes 37 cycles ee12 e4
p_GetBit13: 7 bytes 37 cycles ee13 e5
p_GetBit14: 7 bytes 26 cycles ee14 e6
p_GetBit15: 5 bytes 20 cycles ee15 e7
;Comparing numbers
;-----------------------------------------------
p_IntEqShort: 9 bytes 43 cycles =255 0≤Short<255
p_IntEqNShort: 9 bytes 43 cycles =⁻256 ⁻256≤Short<0
p_IntEqConst: 11 bytes ~49 cycles =1337 48 cycles if true, 49 cycles if false; if 0≤Const<256, p_IntEqShort is used; if ⁻256≤Const<0, p_IntEqNShort is used
p_IntEqVar: 12 bytes ~59 cycles =A 58 cycles if true, 59 cycles if false
p_IntEqExpr: 10 bytes ~60 cycles =() 59 cycles if true, 60 cycles if false
p_IntNeShort: 9 bytes 43 cycles ≠255 0≤Short<255
p_IntNeNShort: 9 bytes 43 cycles ≠⁻256 ⁻256≤Short<0
p_IntNeConst: 11 bytes ~44 cycles ≠1337 46 cycles if true, 41 cycles if false; if 0≤Const<256, p_IntNeShort is used; if ⁻256≤Const<0, p_IntNeNShort is used
p_IntNeVar: 12 bytes ~54 cycles ≠A 56 cycles if true, 51 cycles if false
p_IntNeExpr: 10 bytes ~55 cycles ≠() 57 cycles if true, 52 cycles if false
p_IntGtConst: 8 bytes 37 cycles >1337
p_IntGtVar: 10 bytes 60 cycles >A
p_IntGtExpr: 8 bytes 61 cycles >()
p_IntGeConst: 8 bytes 37 cycles ≥1337
p_IntGeVar: 10 bytes 60 cycles ≥A
p_IntGeExpr: 9 bytes 65 cycles ≥()
p_IntLtConst: 7 bytes 42 cycles <1337
p_IntLtVar: 10 bytes 51 cycles >1337
p_SIntGtVar: 16 bytes 87 cycles >>A
p_SIntGtExpr: 14 bytes 75 cycles >>()
p_SIntGeConst: 14 bytes 70 cycles ≥≥1337
p_SIntGeVar: 15 bytes 80 cycles ≥≥A
p_SIntGeExpr: 14 bytes 85 cycles ≥≥()
p_SIntLtConst: 15 bytes 64 cycles <<1337
p_SIntLtVar: 16 bytes 74 cycles <