Guest User

Untitled

a guest
Jun 25th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. .NOLIST
  2. #INCLUDE "ti83plus.inc"
  3. .LIST
  4. .ORG $9D93
  5. .DB t2ByteTok, tAsmCmp
  6. b_call(_ClrLCDFull) ; clear the screen
  7. LD HL, 0
  8. LD (CurRow), HL
  9. Loop:
  10. b_call(_GetKey) ; get a key
  11. CP kClear ; check if the 'Clear' button was hit
  12. JR Z, Exit ; if it was, exit
  13. AND 1 ; erase all but the last bit
  14. JR Z, WasEven ; if zero, go to that message
  15. LD HL, OddMsg ; otherwise, load not-zero message
  16. JR Display ; go to the Display portion
  17. WasEven:
  18. LD HL, EvnMsg ; load zero message
  19. Display:
  20. b_call(_Puts) ; display loaded message
  21. b_call(_NewLine)
  22. JR Loop ; loop to start
  23. Exit:
  24. LD HL, ExtMsg
  25. b_call(_Puts)
  26. b_call(_NewLine)
  27. RET
  28. EvnMsg:
  29. .DB "Even Number", 0
  30. OddMsg:
  31. .DB "Odd Number", 0
  32. ExtMsg:
  33. .DB "Good bye!", 0
  34. .END
Add Comment
Please, Sign In to add comment