Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .NOLIST
- #INCLUDE "ti83plus.inc"
- .LIST
- .ORG $9D93
- .DB t2ByteTok, tAsmCmp
- b_call(_ClrLCDFull) ; clear the screen
- LD HL, 0
- LD (CurRow), HL
- Loop:
- b_call(_GetKey) ; get a key
- CP kClear ; check if the 'Clear' button was hit
- JR Z, Exit ; if it was, exit
- AND 1 ; erase all but the last bit
- JR Z, WasEven ; if zero, go to that message
- LD HL, OddMsg ; otherwise, load not-zero message
- JR Display ; go to the Display portion
- WasEven:
- LD HL, EvnMsg ; load zero message
- Display:
- b_call(_Puts) ; display loaded message
- b_call(_NewLine)
- JR Loop ; loop to start
- Exit:
- LD HL, ExtMsg
- b_call(_Puts)
- b_call(_NewLine)
- RET
- EvnMsg:
- .DB "Even Number", 0
- OddMsg:
- .DB "Odd Number", 0
- ExtMsg:
- .DB "Good bye!", 0
- .END
Add Comment
Please, Sign In to add comment