Re: A83: DE * 3/4


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

Re: A83: DE * 3/4




On 05-Sep-98, Ahmed El-Helw wrote:

>Can someone please tell me a routine that can multiply de by 3/4, or 
>give you 75% of de.. aka if de = 128, then it becomes = 96. Thanks.
>                                        -Ahmed

>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com

if you know that de*3 will fit in de:

push hl
ld hl,de
add hl,hl
add hl,de
srl h
rr l
srl h
rr l
ld e,l
ld d,h
pop hl

Linus


References: