.nolist #include "ti83plus.inc" #include "Axe.inc" .list #define B_CALL(xxxx) rst 28h \ .dw xxxx .dw AXM_HEADER .dw Ax1_End .db AXM_ALL .dw tok_Load ;Load() .db AXM_INLINE .db AXM_1ARG .org 0 ld hl,($9830) ld (axv_X1t),hl Ax1_End: .dw Ax2_End .db AXM_ALL .dw tok_Next ;Next() .db AXM_SUB .db AXM_1ARG .org 0 ld hl,(axv_X1t) ld de,($982E) or a sbc hl,de ret z add hl,de ld de,-6 add hl,de ld a,(hl) cpl ld e,a add hl,de ld (axv_X1t),hl ret Ax2_End: .dw Ax3_End .db AXM_ALL .dw $00B5 ;Dim() .db AXM_INLINE ;Get Entry type .db AXM_1ARG .org 0 ld hl,(axv_X1t) ld l,(hl) ld h,0 Ax3_End: .dw Ax4_End .db AXM_ALL .dw $00B5 ;Dim()r .db AXM_SUB|AXM_RMOD ;Get Entry Data Pointer (axe style) .db AXM_1ARG .org 0 ld ix,(axv_X1t) ld l,(ix-3) ld h,(ix-4) inc hl inc hl ret Ax4_End: .dw Ax5_End .db AXM_ALL .dw $00B5 ;Dim()rr .db AXM_INLINE|AXM_RRMOD ;Get Page Number .db AXM_1ARG .org 0 ld ix,(axv_X1t) ld l,(ix-5) ld h,0 Ax5_End: .dw Ax6_End .db AXM_ALL .dw tok_Print ;Print(x) .db AXM_SUB .db AXM_1ARG .org 0 ex de,hl ld hl,(axv_X1t) ld bc,-6 add hl,bc ld b,(hl) ex de,hl Ax6_Loop: dec de ld a,(de) ld (hl),a inc hl djnz Ax6_Loop ld (hl),b ret Ax6_End: Ax7: .dw Ax7_End .db AXM_ALL .dw tok_New ;New(x,x,x) .db AXM_SUB .db AXM_3ARGS .org 0 B_CALL(_EnoughMem) pop hl pop bc ex (sp),hl jr c,Ax7_Fail0Args dec hl ld a,(hl) dec hl push hl ld l,(hl) ld h,a sbc hl,bc jr c,Ax7_Fail1Arg add hl,bc add hl,de ex de,hl ex (sp),hl ld (hl),e inc hl ld (hl),d inc hl add hl,bc ex de,hl pop hl B_CALL(_InsertMem) ret Ax7_Fail1Arg: pop hl Ax7_Fail0Args: ld hl,0 ret Ax7_End: Ax8: .dw Ax8_End .db AXM_ALL .dw tok_Delete ;Delete(x,x,x) .db AXM_SUB .db AXM_3ARGS .org 0 pop af pop bc pop de push af push hl add hl,bc jr c,Ax8_Fail ex de,hl dec hl ld a,(hl) dec hl push hl ld l,(hl) ld h,a sbc hl,de pop de jr c,Ax8_Fail add hl,bc ex de,hl ld (hl),e inc hl ld (hl),d inc hl add hl,bc pop de B_CALL(_DelMem) ret Ax8_Fail: pop hl ld hl,0 ret Ax8_End: .dw AXM_END .end