A86: Re: 8-bit division


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

A86: Re: 8-bit division




When dividing by a power of 2, use shifting:

 ld a,(p_col)
 rra
 rra
 rra
 and %00011111
 dec a
 ld (c_col),a


> 
> does anyone know how to do 8-bit division?
> i know _HLdivA, but that's 16-bit.
> i have an 8-bit var (p_col), and i want to do this:
> c_col= [p_col/8] - 1.
> the '-1' would be a [dec], but how do i divide?
> 
> teague costas.
> 
> 



References: