That's good! It also avoids the "preserve carry" issue. Harold > On 3/16/07, William Chops Westfield wrote: >> >> > SendMorseCharA >> > RLF MorseChar,f ; shift msb into carry >> > movf MorseChar,f ; test to see if we're done >> > bz SendMorseCharZ ; We're done, get out > movlw DITLEN > skpc ; skip if dit > movlw DAHLEN >> > call DoBit ; go send bit >> > call InterBitDelay >> > goto SendMorseCharA ; go send next bit, if any >> > SendMorseCharZ >> > return ; we're outta here! > >> Speaking of C compilers, this is a good example of the sort of >> code that I think it would be really difficult for a C compiler >> to generate; It's what I meant by "explicit use of carry." > > I'd do something like the above instead since the difference between a > dit and a dah is their length... > > > (And on the third hand, it is perhaps also an example of optimization >> that doesn't need to be done.) > > True. > > Orin. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist