A83: Re: JP (HL) [Z80]
[Prev][Index][Thread]
A83: Re: JP (HL) [Z80]
LD HL,9327h
JP (HL)
...PC is now 9327h and the z80 CPU is executing at 9327h. The reason for
the parenthesis is that you're not actually jumping into the HL register
(which of course makes no sense), you're jumping to the address pointed to
by the HL register. Or something like that :)
-Dan Englender
----- Original Message -----
From: "Henk Poley" <HPoley@DDS.nl>
To: <assembly-83@lists.ticalc.org>
Sent: Tuesday, October 31, 2000 1:08 PM
Subject: A83: JP (HL) [Z80]
>
> What does JP (HL) exactly do?
>
> 1. PC (Program Counter) is what is at 'adress HL' (jumps to (HL))
> 2. PC is HL (jumps to HL)
>
> I ask this because in the ROM (1.10) the last ROMcall in the jumptable is:
>
> 52E5h:
> EXECUTE_Z80: ; from Squish.inc
> LD HL,9327h
> JP (HL)
>
> And ehm, I always thought that JP (HL) did the first thing I mentioned,
but
> with the example it is probably the second.
>
>
References: