[A83] Re: Defined Variables


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

[A83] Re: Defined Variables




You can load bc, de, and hl with 16 bit words from ram...
ld bc,(pencol) works fine...

You can even store too...
ld bc,$1C20
ld (pencol),bc

and you're not even using hl or a...

But you can only use A or HL for single register stuff.
ld b,(hl)
ld a,(pencol)

so you can't:
ld b,(penrow)
unless you use BOTH b and c.


>From: Gavin Olson <gtolson@snet.net>
>Reply-To: assembly-83@lists.ticalc.org
>To: assembly-83@lists.ticalc.org
>Subject: [A83] Re: Defined Variables
>Date: Mon, 24 Sep 2001 14:51:46 -0400
>MIME-Version: 1.0
>Received: from [195.67.128.9] by hotmail.com (3.2) with ESMTP id 
>MHotMailBD78CBEC00AB40042A18C34380090A530; Mon, 24 Sep 2001 11:52:37 -0700
>Received: from towerguard. (mx-1.sollentuna.net [195.67.128.9])by 
>mx-1.sollentuna.net (Postfix) with ESMTPid 82F5D18067; Mon, 24 Sep 2001 
>20:51:12 +0200 (CEST)
>Received: with LISTAR (v1.0.0; list assembly-83); Mon, 24 Sep 2001 20:51:12 
>+0200 (CEST)
>Received: from smtp.snet.net (smtp-j.snet.net [204.60.6.55])by 
>mx-1.sollentuna.net (Postfix) with ESMTP id C1E881803Ffor 
><assembly-83@lists.ticalc.org>; Mon, 24 Sep 2001 20:51:10 +0200 (CEST)
>Received: from gavcomputer-ii.snet.net (38.221.252.64.snet.net 
>[64.252.221.38] (may be forged))by smtp.snet.net 
>(8.12.0.Beta12/8.12.0.Beta12/SNET-mx-1.5/D-evisionO-evision$) with ESMTP id 
>f8OIov4b014009for <assembly-83@lists.ticalc.org>; Mon, 24 Sep 2001 14:51:03 
>-0400 (EDT)
>From assembly-83-bounce@lists.ticalc.org Mon, 24 Sep 2001 11:54:31 -0700
>Delivered-To: lists.ticalc-assembly-83@mx-1.sollentuna.net
>Message-Id: <5.1.0.14.0.20010924145102.00a38d30@pop.snet.net>
>X-Sender: gtolson@pop.snet.net
>X-Mailer: QUALCOMM Windows Eudora Version 5.1
>In-Reply-To: <F105y1KiwXlFaYQqaUb00004277@hotmail.com>
>X-listar-version: Listar v1.0.0
>Sender: assembly-83-bounce@lists.ticalc.org
>Errors-To: assembly-83-bounce@lists.ticalc.org
>X-original-sender: gtolson@snet.net
>Precedence: bulk
>X-list: assembly-83
>
>
>At 03:59 PM 9/23/2001 -0600, you wrote:
>
> >Thanks, I have part of it working. When I try to assign the value in 
>(VAR)
> >to a register however, I get an error.
> >
> >ld (VAR),a      ;works fine
> >
> >
> >The error I get is "Unused data in MS byte of argument. (82)", in 
>reference
> >to the line which I have this on (I've tried both):
> >
> >ld b,VAR
> >or
> >ld b,(VAR)
> >
> >Again, its probably some idiotic syntax thing, so bear with me.
>
>Actually, it is a hardware restriction whereby only the accumulator and hl
>can do memory access.  You need to use a or hl whenever you do anything
>with memory.
>
>
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp