Guest User

Untitled

a guest
Jun 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 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 ; clear HL
  8. LD (CurRow), HL ; set the cursor to the top of the screen
  9.  
  10. b_call(_GetKey) ; get the first digit
  11. CP kClear ; check if the 'Clear' button was hit
  12. JR Z, Exit ; if it was, exit
  13.  
  14. SUB 142 ; convert from keycode to number
  15.  
  16. LD H, 0
  17. LD L, A ; store A in HL
  18.  
  19. LD B, 10 ; iterate 10 times
  20. Loop:
  21. ADD A, L ; add L to A
  22. DJNZ Loop
  23.  
  24. LD L, A ; store new A value in L
  25.  
  26. b_call(_GetKey) ; get the second digit
  27. CP kClear ; check if the 'Clear' button was hit
  28. JR z, Exit ; if it was, exit
  29.  
  30. SUB 142 ; convert from keycode to number
  31.  
  32. ADD A, L ; add old value to the new input
  33.  
  34. LD L, A ; store final value to L
  35.  
  36. b_call(_Puts)
  37. b_call(_NewLine)
  38. Exit:
  39. RET
  40. .END
Add Comment
Please, Sign In to add comment