Advertisement
Eeems

Untitled

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