[A83] Re: help for a routine


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

[A83] Re: help for a routine




> Van: Ronald Teune <rtwolf@gmx.net>
> 
> How would you do h*256? It's much more than 255 so I guess 0 comes out of
> it (??), unless you'd use a two byte register.

He just wants the anser to be 8bit hat happens inbetween is irrelevant. So
you 'probably' just cast it to a 16bit reg, by conveniently setting l to
zero... Like he does.

> > I need a routine that can make this :
> >
> > Input :
> > - h, e
> > Output:
> > - a=(h*256)/e
> >
> > At this moment i'm using div_hl_de_s, with l:=0 and d:=0, but I'm sure
> > there's a faster and a more clever way to do this...
> >
> > Anybody has an idea ?