[A83] Re: program counter value


[Prev][Next][Index][Thread]

[A83] Re: program counter value




> 
> >On Sat, 1 Dec 2001, The one and only SUCKER ... wrote:
> >
> > >
> > >
> > > >One way might be to have something like this
> > > >
> > > >	call	getPC
> > > >	[..HL is now PC..]
> > > >
> > > >getPC:
> > > >	pop	hl
> > > >	jp	(hl)
> > > >
> > > >Although I think that if you ask how to get PC, you're not able to
> use
> > > >calls, so... you can also use this.
> > > >
> > > >	ld	hl,$E9E1
> > > >	ld	($FE6F),hl
> > > >	call	$FE6F
> > > >	[..now HL is PC..]
> >
> > > Is this 83 and 83+ ??
> >
> >It should work on both yes. In the second example, the 'getPC' routine
> >>from the first example is relocated to a safeRam area. Then you just
> call
> >that routine. Try it with VTI's debugger and you'll see.
> >
> >Tijl
> 
> But, wait a minute !!
> 
> What about load hl with that special sign that means the
> location of this instruction?? (can't remember what it was)
> 
>        SUCKER
> 

ld hl,$
I think that would work.

-- 
    Ronald Teune @School
    http://www.zeekoe.cjb.net
    http://ti.zeekoe.cjb.net
    Anything that's good&useful is made of chocolats

Sent through GMX FreeMail - http://www.gmx.net




Follow-Ups: References: