Afaik, sra (alone) preserves the sign.
-----Original Message-----
From:
assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org] On
Behalf Of Matthew Marshall
Sent: Tuesday, August 12, 2003
2:02 PM
To: Assembly-83@Lists.Ticalc.Org
Subject: [A83] Signed division by
a power of two.
When dividing a signed number by
two, is there any better way than this?
bit 7,a
jp z,Positive
scf
rr a
jp EndPositive
Positive:
sra
EndPositive:
Or does that way even work? I
have been having a hard time catching onto this idea of signed numbers.
Thanks,
MWM