;Unlocks Flash. ;It's important that this run from 8001h, as 73 programs usually do. ;If you mess with this routine, make sure the padding at the bottom ; is still correct. ;To use, copy to 8001h and call it. You can add code after continuePoint. ;Returns carry (or crashes :)) if it didn't/can't work. .nolist #include "ti73.inc" .list jumpTable equ appBackUpScreen ;50 spBackup equ jumpTable+50 ;2 oldStack equ spBackup+2 ;50 .org asm_exec_ram progStart: bcall(_getBaseVer) dec a scf ret nz ld a,b cp 60h ld ix,671Eh jr z,unlockStart cp 90h ld ix,673Fh scf ret nz unlockStart: ld hl,8080h ld (hl),0C3h inc hl ld (hl),returnPoint-progStart+1 inc hl ld (hl),80h in a,(6) push af ld hl,jumpTable ld (hl),80h ld de,jumpTable+1 ld bc,49 ldir ld (spBackup),sp ld hl,(spBackup) ld de,oldStack ld bc,50 ldir ld a,1Ch out (6),a ld hl,(spBackup) ld de,-8 add hl,de ld de,jumpTable ex de,hl ld bc,50 jp (ix) returnPoint: ld sp,(spBackup) ld de,(spBackup) ld hl,oldStack ld bc,50 ldir pop af out (6),a xor a jr continuePoint ;Padding to get continue point to 8083h ;See list file to manually adjust this .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0 continuePoint: ret .end end