A86: Re: Re: Re: help with 16-bit vars


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

A86: Re: Re: Re: help with 16-bit vars



Try:
 
 ld hl,var
 ld a,(hl)
 inc hl
 ld l,(hl)
 ld h,a
 push hl
 pop af
 
but you'd be better off changing the positions at var
-----Original Message-----
From: JBrett <tbarwick@esn.net>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Monday, September 28, 1998 7:09 PM
Subject: A86: Re: Re: help with 16-bit vars

Thanks a lot, Dux.  Still, how would I trade that values of a and f since I can't use "ex a,f".
Thanks,
--------------
Jbrett
tbarwick@esn.net
http://ww2.esn.net/~tbarwick
I just added a TI-86 page, Check it out!!!  
-----Original Message-----
From: Dux Gregis <assets@eden.rutgers.edu>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Monday, September 28, 1998 7:06 PM
Subject: A86: Re: help with 16-bit vars

 ld hl,(var)
 push hl
 pop af
-----Original Message-----
From: JBrett <tbarwick@esn.net>
To: ASM86 Mailing List <assembly-86@lists.ticalc.org>
Date: Monday, September 28, 1998 6:54 PM
Subject: A86: help with 16-bit vars

Can anyone tell me how to load a 16-bit variable into af like this:
 
ld af,var
 
var:
    .db 0,0
 
I want it so that a contains the first byte and f contains the second byte.  Is that possible??  Also, why can't I say "ex a,f"??
Thanks,
--------------
Jbrett
tbarwick@esn.net
http://ww2.esn.net/~tbarwick
I just added a TI-86 page, Check it out!!!