On Saturday 28 March 2009 06:39:23 pm bob...@comcast.net wrote:
> ----- Richard Gray  wrote:
> > I think this example puts the stack-pointer into HL, doesn't it?
> >
> > Sorry!  (I just woke up, and there is no pepsi in the house...)
>
> But isn't this sort of a trick question???  You usually know
> exactly what the PC is at every point in your program!
> The stack pointer is the one that is a bit tricky to get at.
>
> 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.
>
> But I see that OP asked about "hardware debugger", and
> I suppose in that case you might just want to know where
> the program was executing currently, and my answer
> would then be "ask the hardware debugger that you built".
>
> I always use software debugger, myself.
>
> Randy

No, I am making a debugger, and one of the things is to dump the registers
so sending  command the response is a list of registers

PC=1000, BC=1000,etc


Thanks

and by the way I got a answer

ld hl,0
add hl,sp

Thanks again

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

Reply via email to