.nolist #include "ti83plus.inc" .list .org userMem-2 .db 0BBh,6Dh ld hl,sDump rst 20h bcall(_chkFindSym) ret c ld a,b or a ret nz push de bcall(_runIndicOff) bcall(_clrLCDFull) bcall(_homeUp) ld hl,sConfirm bcall(_PutS) bcall(_getKey) bcall(_runIndicOn) bcall(_newLine) pop de cp kCapY ret nz inc de inc de push de call UnlockFlash ld a,7Eh call translatePage ld hl,4000h bcall(_EraseFlash) ld a,7Eh call translatePage ld hl,6000h bcall(_EraseFlash) ld a,7Eh call translatePage ld de,4000h ld bc,4000h pop hl bcall(8087h) ;_WriteFlashUnsafe ld hl,sDone bcall(_PutS) bcall(_newLine) ret sDump: .db AppVarObj,"CERTIMG",0 sConfirm: .db "Press " .db LlBrack,"ALPHA]+",LlBrack,"Y] to " .db "confirm writing " .db "or any other key" .db "to cancel",0CEh,0 sDone: .db "CERTIMG written",0 UnlockFlash: ;Unlocks Flash protection. ;Destroys: appBackUpScreen ; pagedCount ; pagedGetPtr ; arcInfo ; iMathPtr5 ; pagedBuf ; ramCode in a,(6) push af ld a,7Bh call translatePage out (6),a ld hl,5092h ld e,(hl) inc hl ld d,(hl) inc hl ld a,(hl) call translatePage out (6),a ex de,hl ld a,0CCh ld bc,0FFFFh cpir ld e,(hl) inc hl ld d,(hl) push de pop ix ld hl,9898h ld (hl),0C3h inc hl ld (hl),returnPoint & 11111111b inc hl ld (hl),returnPoint >> 8 ld hl,pagedBuf ld (hl),98h ld de,pagedBuf+1 ld bc,49 ldir ld (iMathPtr5),sp ld hl,(iMathPtr5) ld de,9A00h ld bc,50 ldir ld de,(iMathPtr5) ld hl,-16 add hl,de ld (iMathPtr5),hl ld iy,0056h-25h ld a,50 ld (pagedCount),a ld a,8 ld (arcInfo),a jp (ix) translatePage: ld b,a in a,(2) and 80h jr z,_is83P in a,(21h) and 3 ld a,b ret nz and 3Fh ret _is83P: ld a,b and 1Fh ret returnPoint: ld iy,flags ld hl,(iMathPtr5) ld de,16 add hl,de ld sp,hl ex de,hl ld hl,9A00h ld bc,50 ldir pop af out (6),a ret .end end