100 Chapter 2: TI-83 Plus Specific Information
TI-83 Plus Developer Guide Third Release May 28, 2002
• Do some clean up and let the system report the error.
• Modify the error code to remove the GoTo option and have the system report
the error with only a Quit option.
Example one:
Do not allow the error to be reported by the TI-83 Plus. Compute 1/X and return CA = 0
if no error, otherwise return CA = 1.
AppOnErr My_Err_handle
;
B_CALL RclX ; OP1 = (X)
B_CALL FPRecip ; 1/OP1,
;
; If no error then returns from the call
;
AppOffErr ; remove the error handler
OR A ; CA = 0 for no error
RET
;
; control comes here ifX=0andgenerates an error
;
My_Err_handle:
SCF ; CA = 1 for error
RET
Example two:
Allow the error to be reported by the TI-83 Plus, but remove the GoTo option.
Compute 1/X.
AppOnErr My_Err_handle
;
B_CALL RclX ; OP1 = (X)
B_CALL FPRecip ; 1/OP1,
;
; If no error then returns from the call
;
AppOffErr ; remove the error handler
RET
;
; control comes here ifX=0andgenerates an error, ACC = error code
;
My_Err_handle:
RES 7,A ; bit 7 of error code controls GoTo
; option
B_JUMP JError ; trip the error with no GoTo option