On Saturday 28 March 2009 08:25:13 pm Richard Gray wrote:
> The true "hardware debugger" is a logic analyser I suppose - that's what I
> often use. One can see all traffic on the various buses using one of these,
> and for 8-bit stuff one can pick them up quite cheaply on eBay.
>
> The other way is an in-circuit-emulator, but that will still use an RST
> instruction so that the debugging code can take over, however temporarily.
>
> Another way I read about YEARS ago in relation to the Z80 was to use the M1
> signal (first instruction byte fetch) and an interrupt (NMI?) - as a
> single-stepping type of function. I have a book somewhere on this, I'll see
> if I can find it... this would obviously need some additional logic to
> implement.
>
> On Saturday 28 March 2009 23:00:28 bob...@comcast.net wrote:
> > ----- bob...@comcast.net wrote:
> > > Now if you really want to know what the SP was when it
> > > hit a breakpoint (IOW, which breakpoint did you hit?), then
> > > the standard way to do that on z80 is to use restart inst.,
> > > and then look on top of stack.
> >
> > Make that:
> > Now if you really want to know what the PC was when it
> > hit a breakpoint (IOW, which breakpoint did you hit?), then
> > the standard way to do that on z80 is to use restart inst.,
> > and then look on top of stack.
> >
> > (Now, I'm off to the store for caffeine!!!)
> >
> > Randy

Yes, but you can be a little more smarter (and cheaper), just write a monitor, 
the monitor allows to download files into the target, the downloads can be 
modified to enter breakpoints. So you get a debugger without a 80 channel 
logical analyzer or using POD that are avaliable for your target only (and 
cost a ton of money)

This is a project for school, so the idea is to reuse old systems and give to 
the third word contries (I going to develop the debugging system) my study 
partner is developing the control stage (this system can be used for any 
embedded system application)

Thanks

P.S 

the solution was posted before, just examine the stack and get the PC from the 
stack (so call -> load stack into ix -> get the PC and return it into HL

Thanks

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to