Single step (ram) with BRK

Programming the 6502 microprocessor and its relatives in assembly and other languages.
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: Single step (ram) with BRK

Post by barnacle »

Hmm, that's something I had not considered. Time for a rethink :D

Neil
rudla.kudla
Posts: 41
Joined: 20 Apr 2010

Re: Single step (ram) with BRK

Post 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.
Dietrich
Posts: 45
Joined: 01 Jan 2003

Re: Single step (ram) with BRK

Post 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
My system: Elektor Junior Computer, GitHub https://github.com/Dietrich-L
Post Reply