Geekboy

Untitled

Oct 25th, 2011
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .nolist
  2. #include ti83plus.inc
  3. #DEFINE  ProgStart    $9D95
  4. lfsrseed equ appbackupscreen
  5. #define lfsrtaps %10111001
  6. .list
  7. .org progstart-2
  8. .db t2bytetok,tasmcmp
  9.  bcall(_clrlcdfull)
  10.  ld a,77                ;seed
  11.  ld hl,lfsrseed
  12.  ld (hl),a
  13. Main:
  14.  bcall(_getkey)
  15.  bcall(_clrlcdfull)
  16.  ld a,0
  17.  ld (curcol),a
  18.  ld (currow),a
  19.  call LFSR
  20.  ld h,00
  21.  ld l,a
  22.  bcall(_disphl)
  23.  jp main
  24.  
  25. LFSR: ; outputs random value in a
  26.  ld hl,lfsrseed
  27.  ld a,(hl)
  28.  bit 0,a
  29.  rrca
  30.  jp z,_
  31.  xor lfsrtaps
  32. _:
  33.  ld (hl),a
  34.  ret
Advertisement
Add Comment
Please, Sign In to add comment