; Source Code for TI83asm: ; ; Breakpoints-- ; ; Breakpoints are a VERY useful tool for ASM programmers, a tool which I ; could not find in any 83 emulators' debuggers. So Here is source code ; for implementing breakpoints. Just include this in your source code, ; and it should work fine. In your code, when you want to put a break- ; point somewhere, just add the line "Call Breakpoint", compile and run ; it, and when it runs it should stop at that point. From there you can ; open the debugger and look at the variables. NOTE: Because AF is used ; in the loop for Breakpoint, to see what was in AF before breakpoint was ; called, look in memory at address SP and it should be there. To exit the ; Breakpoint, simply change the value in AF to 0, and trace 1 step. That's ; it! After doing this, the value in debugnum is incremented by one. I ; did this so you could tell which breakpoint you are on by number. I have ; tested this on emu83, and it seems to work fine. Email me with any ; questions to starwars101@earthlink.net. Breakpoint: ;(approx. 19 bytes) push af ld a,(debugnum) ;Breakpoint subroutine BreakpointLoop: or a ;You must use an emulator with a debugger jr nz,BreakpointLoop ;for this to work, otherwise you will crash! ld a,(debugnum) ;register a is by default 1. This is the inc a ;breakpoint number. Go into debug mode and ld (debugnum),a ;change a to 0. Then it will increment pop af ;the breakpoint number and continue with the prog, ret ;and then you can trace from there. debugnum .dw 1 ;Breakpoint's memory variable, debugnum