***************************************************************** * * * RECLIB V1.0 * * by Rolf ALber * * mail: Rolf.D.Alber@studbox.uni-stuttgart.de * ***************************************************************** Reclib is a little tool (~1K) for the TI-92, that recovers program-errors in assembler-programs and throws you back to the Fargo-shell instead of crashing the calc (forcing you to reset). Reclib captures Adress-Errors, Illegal Instructions and Division- by-Zero -errors, which are in my opinion the most common when you are programming in assembler. (Future versions might also deal with other errors like Line 1111 and Traps if someone requires it - therefore please mail) A special feature is the posibility to recover, if your program gets stuck in an endless loop. You can also use this feature to freeze your program at any time - p.e. to view the contents of the 68K's registers - and jump back to the program itself or to the shell. Reclib can only be used with your selfmade programs (or those of which you own the source-code) as it has to be initialized each time you jump into a programm (due to the relocation "feature" of the TI). INSTRUCTIONS: ----------------------------------------------------------------- Installing RECLIB: - transfer the file RECLIB.92P to your TI - make sure that you have HEXLIB installed on your TI - make sure that you have the RECLIB.SYM file in the right directory where your assembler is searching for it. - in your own program you have to call an initialization-routine from reclib. Therefore add a jsr reclib[init] to the top: prog_code: jsr reclib[init] ;add this line to the top .... here follows your code IMPORTANT: jsr reclib[init] has to be the VERYFIRST line in your programm !! Otherwise it will surely crash ! - at the end of your program you must tell the assembler, that you are using RECLIB now. therefore add: reloc_open add_library reclib ;add this to your reloc-section . . reloc_close - now Reclib should work with your program -------------------------------------------------------------------- Using RECLIB: In case of an error, RECLIB displays the following: - Type of Error - The contents of the registers immediately before the error happened - A little hexdump of the adress, where the error occured - Or, in case of an ADRESS-ERROR: A hexdump of the adress which caused the adress-error You can use the following keys: - to go back to the Fargo-shell - to switch between the RECLIB-output and the original screen. It might help to see what was on the screen immediately before the error happened, to find the bug. - .... doesn't work if RECLIB was entered because of an error (see next section) - to scroll the hexdump FREEZING with RECLIB: If your program gets stuck in an endless loop or for any other reason you can enter RECLIB at any time you want by pressing the key. Reclib displays the same information as if it was entered through an error. Keys do also the same as above but now as a new feature you can press to jump back to your programm. All interrupts and registers are restored so it should encounter no problems. ---------------------------------------------------------------------- plans for the next version of Reclib: - little disassembler, which tells you the exact command where the error happened. (Attention: for this I need a table with the machine- codes to all assembler-commands. So, I need someone who could mail me such a list!) - ability to handle breakpoints If RECLIB doesn't work as it should on your calc, then please contact me via e-mail at: ROLF.D.ALBER@studbox.uni-stuttgart.de now have fun. -Rolf Thanks go out to Shawn Walker, who helped me with the protected-mode problem.