Advertisement
Eeems

Untitled

Jul 12th, 2011
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .nolist
  2.     #include "ti83plus.inc"
  3.     #define db .db
  4.     .org userMem-2
  5.     .list
  6.     db $BB,$6D
  7. Start:
  8.     bcall(_HomeUp)
  9.     bcall(_ClrLCDFull)
  10.     ld hl,text
  11.     bcall(_PutS)
  12.     bcall(_GetKey)
  13.     ld hl,exec
  14.     ld de,appbackupscreen
  15.     ld bc,execend-exec
  16.     ldir
  17.     jp appbackupscreen
  18. exec:
  19.     ld hl,prgm
  20.     rst 20h ;rMOV9TOOP1
  21.     bcall(_chkFindSym)
  22.     ld  a, b
  23.     or  a
  24.     jr  z, isInRam
  25.     ld  hl, 10
  26.     add hl, de
  27.     call    checkBHL
  28.     bcall(_loadCIndPaged)
  29.     ld  e, c
  30.     inc e
  31.     add hl, de
  32.     call    checkBHL
  33.     bcall(_loadDEIndPaged)  ;this inc's hl
  34.     inc hl
  35.     inc hl
  36.     inc hl      ;BB 6D
  37.     call    checkBHL
  38.     jr  final
  39.  
  40. isInRam:
  41.     ex  de, hl
  42.     ld  e, (hl)
  43.     inc hl
  44.     ld  d, (hl)
  45.     inc hl
  46.     inc hl
  47.     inc hl
  48. final:
  49.     push    bc
  50.     push    hl
  51.     ex  de, hl
  52.     dec hl
  53.     dec hl
  54.     push    hl
  55.     ld  de, $9D95
  56.     push    de
  57.     bcall(_insertMem)
  58.     pop de
  59.     pop bc
  60.     pop hl
  61.     pop af
  62.     push    bc
  63.     push    de
  64.     bcall(_flashToRam)  ;works if it's in ram too
  65.     call    $9D95
  66.     pop hl
  67.     pop de
  68.     bcall(_delMem)
  69.     ret
  70. checkBHL:
  71.     bit 7, h
  72.     ret z
  73.     res 7, h
  74.     set 6, h
  75.     inc b
  76.     ret
  77. execend:
  78. text:
  79.     db "Sorry Eeems but:  RAM cleared.",0
  80. prgm:
  81.     db protProgObj,"HWTESTS",0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement