Re: A85: permanent varibles


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

Re: A85: permanent varibles




crap-ola!  i never realized that hl was a byte shorter than using de!
i thought both were 3 bytes.  looks like i'll have to go back through
all of the Solomon's Key source.........

-mike

On Tue, 14 Apr 1998 21:12:23 -0400, you wrote:

>
>Miklos Bergou wrote:
>> checkscore:
>>  ld hl,hiscore         ; load relative adress of hiscore into hl
>>  ld de,(PROGRAM_ADDR)  ; load adress of program into de
>>  add hl,de             ; add to get absolute adress
>
>To save yourself a byte use the following in place of the above code
>segment.
>
>  ld de, hiscore        ;3-bytes, same as using HL
>  ld hl, (PROGRAM_ADDR) ;only 3-bytes, not 4-bytes when using DE
>  add hl, de
>


References: