Hi, I've been trying to create a custom function grapher in ez80 assembly. My problem arises when intentional errors are ignored by the program, such as dividing by 0. Here's the current code:


Code:

.nolist
#include "ti84pce.inc"
.list

   .org UserMem-2
   .db tExtTok,tAsm84CeCmp
   
   ld   hl, errCatch
   call   _PushErrorHandler
   
   ld   hl, y1Name
   call   _VarNameToOP1HL
   
   call   _ParseInp
   
   call   _CkOP1Real
   jr   z, store
   
   call   _PopErrorHandler
   
errCatch:
        call   _OP1Set1
        call   _StoY
   ret

store:
   call   _StoY
   call   _PopErrorHandler
   
   call   _CleanAll
   ret


y1Name:
   .db      EquObj, tVarEqu, tY1, 0


For example, when Y1 = 1 / (10 - X), X = 10, and Y = 5, Y remains 5 and no error is thrown by the system.

The most recent documentation I've been able to find is for the Ti-83 Plus here: sdk83pguide. While there is a section on error handlers, it is hard to understand for beginners.

Any help would be appreciated understanding error handlers and how to install custom ones. Thanks.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement