My brother wrote a simple loop to blink an LED. I added some bit shifting and testing to make it send morse code.
element: lsl r0 tst r0 breq character; if end of character brcc dit dah: cbi portb,led rcall beep rcall beep dit: cbi portb,led rcall beep sbi portb,led rcall space rjmp element ; end of element
I was at a hamfest at the dawn of the microcomputer age when a fellow I met there mentioned that a variable sized morse character would fit nicely in a byte if one extra one-bit were added to mark the end of the character. Good idea.