A83: Re: Variable loads
[Prev][Next][Index][Thread]
A83: Re: Variable loads
ld hl,$XXXX
call _setxxxxop2
If you want it stored in op1 then add this "call _op1toop2"
if you just want to say display a num between 100 and 255 do this...
ld l,a ; put a in the lower byte of HL
ld h,0
call _setxxxxop2
call _op1toop2 ; only way to store in op1
ld a,X ; X= num of digits
call _dispop1a
-harper
----------
> From: Jonathan Wang <jwang@isb.bj.edu.cn>
> To: assembly-83@lists.ticalc.org
> Subject: A83: Variable loads
> Date: Friday, December 19, 1997 8:11 AM
>
>
> I was just wondering...can you load variables directly into op1 & op2
> instead of a. I think I'll need this since a can't handle values
> larger than 99. For example:
>
> #define somevar 8265h
>
> ld (op1),(somevar)
>
> -and-
>
> ld (somevar),(op1)
>
> How about:
>
> ld hl,(somevar)
> ld (op1),hl
> ld hl,(op1)
> ld (somevar),hl
>
> If either or both of these will work, let me know. If I don't need
> to do this, if a regular register (a,b,c,d,e) will work instead of
> having to use op1 or hl, let me know. (I'm planning to deal with
> values as much as 5,000,000. Thanx.
>
>
> Jonathan Wang
> jwang@isb.bj.edu.cn
> jonathan_wang@hotmail.com
>
> Come visit my home page:
> http://www.htmlinfo.home.ml.org/
>
> Quote of the day:
>
> Anything that can go wrong will go wrong.
> - Murphy