A85: Re: Re: Assembly-85 Digest V1 #530
[Prev][Next][Index][Thread]
A85: Re: Re: Assembly-85 Digest V1 #530
Isn't mult_hl a ROM function ?
DInes
----- Original Message -----
From: Jimi Malcolm <MalcolmJ1@email.msn.com>
To: <assembly-85@towerguard.unix.edu.sollentuna.se>
Sent: Saturday, March 27, 1999 11:19 PM
Subject: 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
> ===============
>
>
>
>
References: