Re: A83: Why Don't it work??


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

Re: A83: Why Don't it work??




While, Jonah's approach is more optmized, and I would be more inclined to 
use it, your error is caused because only register a can be loaded into a 
predetermined memory location (ie. a label rather than (hl) ).

when you want to do "ld (currow),c" you can do this:
ld a,c
ld (currow),a
ld a,b
ld (curcol),a

that should eliminate the error.

-harper


At 03:51 PM 8/27/00 -0400, you wrote:

>In a message dated 8/27/00 3:48:43 PM Eastern Daylight Time,
>cslater@wcnet.org writes:
>
> >   I am making a very simple program for ION, everything should work, just
> >  when I assemble it I get the strangest error messages.
> >  Here is the problematic 2 lines
> >
> >           ld (currow),c
> >           ld (curcol),b
>
>Try ld (currow),bc.  The only 8-bit register you can load directly to memory
>is a, but you can load bc, de, and hl as well if you want to write both bytes.
>
>
>----
>Jonah Cohen
><ComAsYuAre@aol.com>
>http://jonah.ticalc.org




References: