Oh great, just like the dighole site, I'm going to spend an hour or two fiddling with this to see how small I can make it. _Thanks!_ ;-( :) -Adam On 4/9/07, Tamas Rudnai wrote: > Hi Berry, > > That's a good idea! And of course we could optimize further like this: > > ; Morse code, tree structured. > ; Example fragment assumes the basic elements have been previously defined: > > P: > call dit > G: > call dah > N: > call dah > E: > call dit > goto interchar > > A: > call dit > T: > call dah > goto interchar > > > #pragma shrink > ; the 'shrink' directive will shrink your code even further > > Tamas > > > > > On 4/9/07, Barry Gershenfeld wrote: > > > > As your morse code programs are getting smaller and smaller, they are in > > danger of disappearing! This code trades efficiency for novelty. I saw > > this idea at a ham club talk (in the '70's) and have been doing it this > > way > > ever since. Since you guys use assembler more than anything else, I'll > > post it that way. I do the same thing in other languages. > > > > ; Morse code, tree structured. > > ; Example fragment assumes the basic elements have been previously > > defined: > > > > E: > > call dit > > goto interchar > > > > N: > > call dah > > goto E > > > > G: > > call dah > > goto N > > > > P: > > call dit > > goto G > > > > T: > > call dah > > goto interchar > > > > A: > > call dit > > goto T > > > > #pragma etc > > ; the 'etc' directive writes the rest of the program for you! > > > > ; Barry > > > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > > -- > unPIC -- The PIC Disassembler > http://unpic.sourceforge.net > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Moving in southeast Michigan? Buy my house: http://ubasics.com/house/ Interested in electronics? Check out the projects at http://ubasics.com Building your own house? Check out http://ubasics.com/home/ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist