A85: Re: Assembly-85 Digest V1 #530


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

A85: Re: Assembly-85 Digest V1 #530




i'm including a routine that multiplies h and l and puts the answer in hl
(hl=h*l).  you probably want to do something like the following example.

jimi

usage:
ld h,16    ;you wanted to multiply something by 16
ld l,<what you wanted to multiply it by...i'm assuming rows of pixels>
call &mult_hl
ld de,VIDEO_MEM
add hl,de


===============
MULTIPLY H&L
input:  h,l
output: hl=h*l
destroy:b
---------------
mult_hl:
 dec h
 ld b,h
 ld h,0
m_1:
 add hl,hl
 djnz m_1
 ret
===============





Follow-Ups: