A83: Re: Ld
[Prev][Next][Index][Thread]
A83: Re: Ld
You could do this:
call _rclX
call _convop1
ex de,hl
ld a,h
or l
cp 1
Also, if you don't care about destroying a, you could dec it instead of doing the cp, because if a==1 then dec'ing it
will set the z flag also.
----- Original Message -----
From: "Marc Puts" <marcputs@hetnet.nl>
To: <assembly-83@lists.ticalc.org>
Sent: Wednesday, January 26, 2000 09:09
Subject: A83: Ld
I use the following code. It seems like it's working,
but there's one thing that I'm not sure about:
call _rclX
call _convop1
ex de,hl
ld a,hl
...
cp 1
You can see that I want to compare 1 to hl.
How can I do this?
ld a,hl ;does not work
ld a,h ;does not work
ld a,l ;this seems to work, but I don't think it's the right way to do
it.
Thanx,
__ __
| \/ |
| \ / | __ _ _ __ ___
| |\/| |/ _` | '__/ __|
| | | | (_| | | | (__
|_| |_|\__,_|_| \___|
References:
- A83: Ld
- From: "Marc Puts" <marcputs@hetnet.nl>