Just a short note: The averaged output generated by the posted code is formed from eight added positions, then just shifted right 3 steps to divide by 8. This truncates, giving a rounding error of a half lsb average. Remedy is of course to initialise the 3-byte adder T4:T3:T2 to 000004 instead of clearing it as now is done in routine Sum16. /Morgan Morgan Olsson ph +46(0)414 70741 MORGANS REGLERTEKNIK fax +46(0)414 70331 H€LLEKS (in A-Z letters: "HALLEKAS") SE-277 35 KIVIK, SWEDEN mrt@iname.com ___________________________________________________________