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 ; clear HL
- LD (CurRow), HL ; set the cursor to the top of the screen
- b_call(_GetKey) ; get the first digit
- CP kClear ; check if the 'Clear' button was hit
- JR Z, Exit ; if it was, exit
- SUB 142 ; convert from keycode to number
- LD H, 0
- LD L, A ; store A in HL
- LD B, 10 ; iterate 10 times
- Loop:
- ADD A, L ; add L to A
- DJNZ Loop
- LD L, A ; store new A value in L
- b_call(_GetKey) ; get the second digit
- CP kClear ; check if the 'Clear' button was hit
- JR z, Exit ; if it was, exit
- SUB 142 ; convert from keycode to number
- ADD A, L ; add old value to the new input
- LD L, A ; store final value to L
- b_call(_Puts)
- b_call(_NewLine)
- Exit:
- RET
- .END
Add Comment
Please, Sign In to add comment