[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
References: