On Thu, 13 Dec 2001, Drew Vassallo wrote: > > > movf hourhand, w ; > > > bcf status, c ; > > > rlf hourhand, f ;hourhand X2 > > > rlf hourhand, f ;hourhand X2 > > > addwf hourhand, f ;wreg still contain original value of hourhand?? > > You can save one instruction I think: > > bcf STATUS, C ; or use "clrc" > rlf hourhand, w ; W=hourhand*2 > addwf hourhand, f ; =hourhand*3 (hourhand+hourhand*2) > addwf hourhand, f ; =hourhand*5 (hourhand*3+hourhand*2) 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