ON 20050209@1:40:20 PM at page: http://www.piclist.com/microchip/math/mul/8x8u.htm#38392.1556481481 James Newton[JMN-EFP-786] published post 38392.1556481481 /techref/microchip/math/mul/23x8bbaj.htm microchip math mul 23x8bbaj |Delete 'P-' before: '' but after: 'allasso@bacavalley.com asks:
/techref/microchip/math/mul/8x8u.htm This is a wonderful little routine. So wonderful I can't figure out how it works. Is there something I am missing, or something about the PIC that I am not familiar with? Here is my question:

How is the overflow from the rrf of H_byte put into the top of L_byte? It seems like it just magically appears. Yes, it works, I've seen it. But how?

Thanks, Allasso
|Delete 'P-' before: '' but after: 'allasso@bacavalley.com
Answer to my own question:

I did not understand how rotate instructions work. I see now that whatever is sitting in the carry will be brought into whatever file is being rotated, regardless of where the carry came from. So, if there is a carry generated from a rotate just prior to the next, the next rotate will bring that carry in.

Now I understand what "rotate through carry" means.

Allasso
|Delete 'P-' before: '' but after: '