Re: A85: permanent varibles


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

Re: A85: permanent varibles




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


Follow-Ups: References: