Page 2 of 2

Re: Single step (ram) with BRK

Posted: Fri Feb 17, 2023 8:54 pm
by barnacle
Hmm, that's something I had not considered. Time for a rethink :D

Neil

Re: Single step (ram) with BRK

Posted: Wed Feb 22, 2023 8:16 am
by rudla.kudla
You will probably also need to print a list of all currently defined breakpoints and allow clearing some of them.
The best option probably is to have a list of breakpoint addresses and search a breakpoint based on it's address. The same table will contain the code of the instruction you replaced with BRK.

Re: Single step (ram) with BRK

Posted: Wed Feb 22, 2023 5:03 pm
by Dietrich
You might want to have a look on my DEBUG.COM, which offers most of the discussed features with the notable exception of stepping through ROM code. The program uses the BRK method and enables to set up tp 8 breakpoints [0..7]. The source can be found here: https://github.com/Dietrich-L/CPM-65/bl ... /DEBUG.ASM

Command syntax :

Code: Select all

        DEBUG V1.7                     (c) 14.6.1990
Command Summary:
 Dnnnn,mmmm dump memory          Fnnnn,mmmm,cc fill memory
 Gnnnn      go from nnnn         Znn        wait for nn/10 s
 Lnnnn,mmmm list mnemonics       Ennnn,bb,bb.. enter bytes
 Rfilename.ext read file         Wfilename.ext write file
 Nfilename.ext FCB1=filename
 Cnnnn,<string>     enter string Snnnn,mmmm,bb,..   search bytes
 Tdd        trace dd steps       Xr,bb      set register
 Jdd        jump dd opcodes      Mn,m,j     move to n from m,j
 Bd,nnnn    set breakpoint       Kd         kill breakpoint
 ?          prints this screen   ;          command separator
 /dd        repeat dd times      Q          quit to CP/M
The progam installs itself in high memory at $C000, the code to be analyzed can be anywhere in the available RAM.

Enjoy

Dietrich