Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .nolist
- #include "ti83plus.inc"
- .org userRAM-2
- .list
- db $BB,$6D
- Start:
- bcall(_HomeUp)
- bcall(_ClrLCDFull)
- ld hl,TXT
- bcall(_PutS)
- bcall(_GetKey)
- ld hl,exec
- ld de,saferam
- ld bc execend-exec
- ldir
- exec:
- ld hl,prgm
- rst rMOVE9TOOP1
- bcall(_chkFindSym)
- ld a, b
- or a
- jr z, isInRam
- ld hl, 10
- add hl, de
- call checkBHL
- bcall(_loadCIndPaged)
- ld e, c
- inc e
- add hl, de
- call checkBHL
- bcall(_loadDEIndPaged) ;this inc's hl
- inc hl
- inc hl
- inc hl ;BB 6D
- call checkBHL
- jr final
- isInRam:
- ex de, hl
- ld e, (hl)
- inc hl
- ld d, (hl)
- inc hl
- inc hl
- inc hl
- final:
- push bc
- push hl
- ex de, hl
- dec hl
- dec hl
- push hl
- ld de, $9D95
- push de
- bcall(_insertMem)
- pop de
- pop bc
- pop hl
- pop af
- push bc
- push de
- bcall(_flashToRam) ;works if it's in ram too
- call $9D95
- pop hl
- pop de
- bcall(_delMem)
- ret
- checkBHL:
- bit 7, h
- ret z
- res 7, h
- set 6, h
- inc b
- ret
- text:
- db "Sorry Eeems but: RAM cleared.",0
- prgm:
- db protProgObj,"HWTESTS",0
- execend:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement