Sat May 11, 2013 11:23 pm
movwf N,A ; "
movf M+1,W,A
mulwf N+1,A ; compute M(H) x N(H)
movff PRODL,PR+2
movff PRODH,PR+3
movf M,W,A ; compute M(L) x N(L)
mulwf N,A
movff PRODL,PR
movff PRODH,PR+1
movf M,W,A
mulwf N+1,A ; compute M(L) xN(H)
movf PRODL,W,A ; add M(L) x N(H) to P(R)
addwf PR+1,F,A ; "
movf PRODH,W,A ; "
addwfc PR+2,F,A ; "
movlw 0 ; "
addwfc PR+3,F,A ; add carry
movf M+1,W,A
mulwf N,A ; compute M(H) x N(L)
f PRODL WA dd M N t PR
movf PRODL,W,A ; add M(H) x N(L) to PR
addwf PR+1,F,A ; "
movf PRODH,W,A ; "
addwfc PR+2,F,A ; "
movlw 0 ; "
addwfc PR+3,F,A ; add carry
nop
end
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.