Just thinking, use ASCII value of letter, load morse at that array element using special notation (letters have 1 to 3 codes).
Only need 6 bits of 1 byte to store morse code of a letter:
Bit 7, 1st code:
0 not used
1 used
Bit 6, 1st code value:
0 dot
1 dash
Bit 5, 2nd code:
...and so on...
That way you can store morse code for entire alphabet using 1 byte each into an array.
Then loop through a text string, gosub a routine that converts letter to ascii, looks up the array element and generates morse code.
Only need a text string, main loop and morse subroutine.
Robert
![]()
Bookmarks