This routine really had me thinking. It really is smart. First i thought saw a problem when A + B overflows and (B+1) = FF But as i commented it for myself i saw that the problem i thought i saw was that a zero was not added in that case, and adding a zero or not dont change the result, as we all know... :) I post my comments for anyone interested: > movfw B > addwf A,F ;if A + B sets carry, > > movfw B + 1 ;and B+1 = FF > skpnc ;then > incfsz B + 1,W ;W here becomes 00 > addwf A + 1,F ;and this add to A+1 is skipped, ;so A+1 is neither read nor updated ! ;It does not matter, as it is zero we would add. :) ;The good thing is that carry is saved, as we jump over addwf, ;so we always have a relevant carry into next section below! > > movfw B + 2 ;The same in this section... > skpnc btfsc > incfsz B + 2,W > addwf A + 2,F > > movfw B + 3 ;and this etc.. > skpnc > incfsz B + 3,W > addwf A + 3,F > >dwayne Regards /Morgan Morgan Olsson ph +46(0)414 70741 MORGANS REGLERTEKNIK fax +46(0)414 70331 HLLEKS (in A-Z letters: "HALLEKAS") SE-277 35 KIVIK, SWEDEN mrt@iname.com ___________________________________________________________