Hi Scott, You'd have to know that the C flag wasn't going to be set by the ADDWF.. Otherwise you'd end up with (hourhand*5)+1 Assuming that the hourhand is going to be between 0 and 11 or 1 and 12, the ADDWF will clear the carry for you and all will be ok.. Ash. --- Ashley Roll Digital Nemesis Pty Ltd www.digitalnemesis.com Mobile: +61 (0)417 705 718 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Scott Dattalo > Sent: Friday, 14 December 2001 2:24 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]:Multiply procedure > > That works, but it sounds like the goal is to keep "hourhand" > in W instead > of 2 times hourhand. Consider this snippet: > > movf hourhand,w > addwf hourhand,f ; 2* > rlf hourhand,f ; 4* > addwf hourhand,f ; 5* and w still contains the original > > Scott -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads