Re: A86: Sorry Dux. =-|


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

Re: A86: Sorry Dux. =-|




> 200 * 6 would loop an extra 5 times.

That's why you ld 200 into hl not b

> > ;African Swallow Algorithm_________________________
> > ;Input: hl * b                                    |
> > ;Output: hl                                       |
> > ;Destroys: a, b, de                               |
> > ;Size: 27 bytes                                   |
> > ;--------------------------------------------------
> > ASMult:
> >         xor a
> >         ld d, a
> >         ld e, a
> >         cp b
> >         jp z, Bzero
> >         cp l
> >         jp nz, ASTop
> >         cp h
> >         ret z
> > ASTop:
> >         srl b
> >         jp nc, ASkipadd
> >         ex de, hl
> >         add hl, de
> 
> you need ex de,hl again here

No, I don't.  Check for yourself.

> > ASkipadd:
> >         ret z
> >         add hl, hl
> >         jp ASTop
> > Bzero:
> >         ld h, a
> >         ld l, a
> >         ret


-- 
Tercero	 --  Email: mailto:tercero@busprod.com

"The stone the builders rejected has become the capstone;"
			--Psalms 118:22
"Everyone who falls on that stone will be broken to pieces,
but he on whom it falls will be crushed."
			--Luke 20:18


Follow-Ups: References: