Re: A82: Simpler way?


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

Re: A82: Simpler way?



At 06:53 PM 6/29/97 -0400, you wrote:
>Here is an excerpt from the "Graphbuf Test 1" (OShell-82) program:
>
>ITEM = $8BDF
>
>.ORG 0
>.DB "Graphbuf Test 1",0
>
>  ROM_CALL(CLEARLCD)
>  LD A,0
>  LD (ITEM),A
>
>
>Wouldn't the following be a shorter (and faster) way of doing the same thing?
>
>ITEM = $8BDF
>
>.ORG 0
>.DB "Graphbuf Test 1",0
>
>  ROM_CALL(CLEARLCD)
>  LD (ITEM),0
>
>
>I don't want to have people flooding this list with "YES" or "NO" answers,
>so privately e-mail me.

Seeing as how there is little traffic on this list, I thought I'd answer
here so that others might learn.

You cannot move immediate values into memory on the 82 (or 83 or 85), you
must first move the value into the register, Z80 assembly language simply
does not support this (if you yearn to do operations such as this, get a
TI-92 :), try it and you will get a compiler error. So this is the smallest
and fastest way to do it.

	-Andrew


References: