Re: A86: RE: Modulo


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

Re: A86: RE: Modulo




Where will the remainder be?

Glen
tutorial1.cjb.net

In a message dated Fri, 12 Nov 1999  4:21:56 PM Eastern Standard Time, ComAsYuAre@aol.com writes:

> 
> In a message dated 11/12/99 16:19:02 Eastern Standard Time, 
> glendon.solsberry@tricon-yum.com writes:
> 
> >      Sorry, let me clarify...
> >       
> >       I want to do A mod B.  How do I do this?
> 
> The easiest way is to use _divHLbyA
> 
>     ld l,a
>     ld h,0          ;hl=numerator
>     ld a,b          ;a=denominator
>     call _divHLbyA
> ;hl=hl/a
> ;a=hl%a
> 
> 
> ----
> Jonah Cohen
> 
> http://linux.hypnotic.org/~jonah/




Follow-Ups: