0 Members and 4 Guests are viewing this topic.
.nolist#include "ti83plus.inc".list#define cxPrevApp cxPrev+cxCurApp-cxMain#define p_GetArc $55E7#define p_ReadArcApp $5658#define p_CopyArc $568D#define TokenHook_Temp appRawKeyHandle#define AxiomTokens statVars#define AxiomTokens_End curGStyle.org $71E0TokenHook: .db $83 ld a,(cxCurApp) cp kPrgmEd ret nz ld bc,(EditTop) ld a,(bc) cp tDecPt ret nz inc bc ld a,(bc) cp tDecPt jr z,TokenHook_IsAxe sub tA cp tTheta-tA+1 ret ncTokenHook_IsAxe: push hl ld hl,cxPrevApp ld a,kPrgmEd cp (hl) jr z,TokenHook_SkipAxiomSearchTokenHook_AxiomSearch: ld (hl),a push de B_CALL(_IsAtTop) push de push hl B_CALL(_BufToBtm) B_CALL(_IsAtTop) sbc hl,de ld b,h ld c,l ex de,hl ld de,AxiomTokens call TokenHook_AxiomSearch_Start pop hl ld (editTop),hl B_CALL(_BufToTop) pop hl ld (editTop),hl pop deTokenHook_SkipAxiomSearch: inc e ld hl,AxeTokens ld b,0 jr TokenHook_CompareLoop_StartTokenHook_CompareLoop: cp e inc hl jr z,TokenHook_LowByteMatchTokenHook_NoMatch: inc hl ld c,(hl) inc c add hl,bcTokenHook_CompareLoop_Start: ld a,(hl) inc a jr nz,TokenHook_CompareLoopTokenHook_DoneNoMatch: add hl,hl ld hl,AxiomTokens jr nc,TokenHook_CompareLoop_Start pop hl retTokenHook_LowByteMatch: ld a,(hl) cp d jr nz,TokenHook_NoMatchTokenHook_Match: ld de,localTokStr push de ld c,17 ldir pop hl pop bc retTokenHook_AxiomSearch_CheckHeader: call ReadArc inc de add a,c ld bc,$C0DE sbc hl,bc ld c,a ret zTokenHook_AxiomSearch_Loop___: pop bcTokenHook_AxiomSearch_Loop__: pop bcTokenHook_AxiomSearch_Loop_: pop hlTokenHook_AxiomSearch_Loop: ld a,tAsmComp cpir ret po push hl dec hl dec hl ld a,(hl) cp t2ByteTok jr nz,TokenHook_AxiomSearch_Loop_TokenHook_AxiomSearch_Backtrack: dec hl ld a,(hl) cp tSpace jr z,TokenHook_AxiomSearch_Backtrack sub tColon cp tEnter-tColon+1 jr nc,TokenHook_AxiomSearch_Loop_TokenHook_AxiomSearch_FindAxiom: pop hl push hl push bc dec hl rst 20h ld hl,OP1 ld (hl),AppVarObj ld a,tRParen ld bc,10 cpir dec hl ld (hl),b ld l,OP1&$FF call p_GetArc+1 jr c,TokenHook_AxiomSearch_Loop__TokenHook_AxiomSearch_FoundAxiom: ex de,hl ld c,b call TokenHook_AxiomSearch_CheckHeader ld b,32+1TokenHook_AxiomSearch_ScanAxiom: call ReadArc inc de ld a,h or l jr z,TokenHook_AxiomSearch_EndOfAxiom add hl,de ld de,5 add hl,de ex de,hl djnz TokenHook_AxiomSearch_ScanAxiomTokenHook_AxiomSearch_EndOfAxiom: call TokenHook_AxiomSearch_CheckHeader call ReadArc inc de ld a,c push hl ld bc,(TokenHook_Temp) add hl,bc ld bc,-AxiomTokens_End add hl,bc jr c,TokenHook_AxiomSearch_Loop___ ld hl,(TokenHook_Temp) ex de,hl pop bc call p_CopyArc+5 res statsValid,(iy+statFlags) pop bc pop hlTokenHook_AxiomSearch_Start: ld (TokenHook_Temp),de ld a,$FF ld (de),a jr TokenHook_AxiomSearch_LoopReadArc: ex de,hl xor a cp c jr z,ReadArc_RAM push bc push hl call p_ReadArcApp+11 pop de inc de pop bc retReadArc_RAM: ld e,(hl) inc hl ld d,(hl) ex de,hl retAxeTokens: .db $F4,$03,5,"Copy(" .db $FE,$03,5,"Exch(" .db $0E,$04,5,"Freq(" .db $66,$01,5,"Buff(" .db $62,$01,5,"sign{" .db $06,$00,5,Lconvert,"Char" .db $08,$04,4,Lconvert,"Hex" .db $02,$04,5,"Data(" .db $4E,$01,7,"Bitmap(" .db $02,$00,4,Lconvert,"Tok" .db $80,$04,7,"#Axiom(" .db $04,$04,5,"Rect(" .db $06,$04,6,"RectI(" .db $58,$02,3,"var" .db $5A,$02,4,"appv" .db $5C,$02,3,"grp" .db $F6,$01,4,"port" .db $52,$01,5,"Text " .db $D8,$01,8,"Pt-Mask(" .db $DA,$01,7,"pt-Get(" .db $D0,$01,3,"Get" .db $14,$04,5,"rotC(" .db $16,$04,6,"rotCC(" .db $18,$04,6,"flipV(" .db $1A,$04,6,"flipH(" .db $C8,$03,7,"inData(" .db $B8,$01,5,"input" .db $74,$01,6,"float{" .db $72,$01,4,"nib{" .db $F6,$03,9,"#Realloc(" .db $68,$01,6,"#Icon(" .db $80,$01,2,Llambda,"(" .db $38,$03,5,"Load(" .db $3A,$03,5,"Next(" .db $14,$03,7,"Render(" .db $3C,$03,6,"DrawL(" .db $3E,$03,6,"DrawR(" .db $16,$03,6,"DrawS(" .db $82,$03,6,"Print(" .db $44,$03,3,"Up(" .db $46,$03,5,"Down(" .db $5C,$03,5,"Left(" .db $40,$03,6,"Right(" .db $42,$03,4,"New(" .db $5E,$03,7,"Delete(" .db $FF
In other news, Frey continues kicking unprecedented levels of ass.
Some things I'm particularly curious about:- The token numbers are difficult for developers to type in manually, any ideas of how I could generate a list of equates?
So the main thing I wanted to talk about in the new release is the new "Axe Fusion" compile option. I was previously calling this "Axe Framework" but fusion is more literal to what is going on, implies that it requires Axe, and sounds cooler.To reiterate, what this option does is not add ANY built-in Axe routine to your program. These include things like All DispGraphs, all Sprite commands, all drawing, advanced math, etc. Instead there is a tiny routine routine added to the start of the program that finds the Axe app and steals the routines from there (like a shell). The header in Fusion files is literally identical to the Ion header and it should still work in all major shells. In the end, this reduces code size a lot, usually over 10% sometimes higher than 20%.Keep in mind that this is a beta feature, meaning it is very unstable right now. First of all, I would not recommend publishing Axe Fusion programs on sites targeted to end users because those programs may not work with future versions of Axe. Second of all, I'm not sure if it is working with Axioms right now, I didn't have time to check.So basically, I added this feature prematurely so that you can all test it out and tell me what you think. How much is it reducing your code sizes?