0 Members and 2 Guests are viewing this topic.
.org $8001 bit 4, (iy + 8) ret nz ;apd ld hl, progName rst 20h bcall(_executePrgm) retprogName: .db protProgObj, "OFFBY1", 0
FD CB 08 66 C0 21 0E 80 E7 EF 7C 4E C9 06 4F 46 46 42 59 31 00
.nolist#include "ti83plus.inc"#include "dcs7.inc".list_ExecutePrgm .equ 4E7Ch.org progstart ld hl, AppVar rst 20h bcall(_ChkFindSym) jr nc, notOK ld hl, AppVar rst 20h ld hl,AppVar-AppVarCode bcall(_CreateAppVar) jr c, notOK ld hl, AppVarCode ld bc,AppVar-AppVarCode ldir set 1,(iy+33h) retnotOK: ld hl, 0 ld (CurCol),hl ld hl, TextError bcall(_PutS) retAppVarCode:.relocate $8001 bit 4, (iy + 8) ret nz ;apd ld hl, progName rst 20h bcall(_ChkFindSym) ld a,b or a call nz, UnArchive bcall(_ExecutePrgm) call UnArchive retUnArchive: ld hl, progName rst 20h bcall(_Arc_Unarc) ld hl, progName rst 20h retprogName: .db protProgObj, "OFFBY1", 0AppVar:.db AppVarObj,"OFFSCRPT"TextError:.db "Error!",0.endEND
.nolist#include "ti83plus.inc"#include "dcs7.inc".list_ExecutePrgm .equ 4E7Ch ;feel free to add this to ti83plus.inc.org progstart ; doing this everytime will eventually ld hl, AppVar ; be a pain when you have a lot rst 20h bcall(_ChkFindSym) ;this leaves OP1 intact jr c, appvarDoesntExist bcall(_delVarArc); jr nc, notOK ;see below VV ld hl, AppVar rst 20happVarDoesntExist: ld hl,AppVar-AppVarCode bcall(_CreateAppVar); jr c, notOK ;this throws Err:Memory, not C inc de ;| inc de ;|these two are because DE is originally ld hl, AppVarCode ; pointing to the size bytes ld bc,AppVar-AppVarCode ldir set 1,(iy+33h) ret;notOK:; ld hl, 0 ; ^^; ld (CurCol),hl ;this is a matter of style, but you probably; ld hl, TextError ; just want to overwrite OFFSCRPT. the reason; bcall(_PutS) ; for this is in case you run your program twice; ret ; or there's an OFFSCRPT present you didn't makeAppVarCode:.relocate $8001 bit 4, (iy + 8) ret nz ;apd ld hl, progName rst 20h bcall(_ChkFindSym) ret c ;you probably just forgot this ld a,b or a call nz, UnArchive bcall(_ExecutePrgm) call UnArchive retUnArchive: ld hl, progName rst 20h bcall(_Arc_Unarc) ld hl, progName rst 20h retprogName: .db protProgObj, "OFFBY1", 0AppVar:.db AppVarObj,"OFFSCRPT";TextError:;.db "Error!",0 ;not needed now.endEND