What’s the best way to store Morse Code dots and dashes in C? Max Maxfield explores this weighty (pun intended) issue.
Making Links with Cables and Connectors. At HF frequencies, cable design is not all that critical, but get up into the VHF, UHF, and microwave regions, and it’s a different matter.
Bend, punch and step on these transistors. Japanese researchers have developed stretchable, tough electronics that could be incorporated into clothing, transforming wearable technology.
Alan Larson says
I would guess that the author of the Morse code programming article was being paid to write, and really never had thought about the problem. Any method that takes more than one byte per entry in a single table is a waste of space. A table of one byte per ascii value, and a few small routines for special cases is all that is needed. The only interesting goal is getting the whole thing in under 1 K bytes of object code — and that shold be fairly easy on most archetectures.
His C method of having each character having a C variable referencing a pointer to a null terminated string is wasteful, an useless, because it provides no method of the program looking up which Morse applies to each ASCII character.
The magazine producer must have been desperate to fill space to include this. The blog writer must have been even more desperate to include a reference to it.
(By the way, I did it in under 1 K bytes on a Macintosh back in the mid 80’s. My lookup table was 1 byte per ASCII value.)
Dave, N8SBE says
I did it in 6800 machine language in under 1K, which also included an entire repeater controller, which included a CW identifier, 3 minute time-out timer, 1 second courtesy tone, 3 second tail, Touchtone(r) and phone control, and Autopatch. This was back in 1979, and used a 6802 with a 2708 1Kx8 EPROM, and was the basis for my master’s thesis at the time. This system ran the Tenn Tech ham club 2M repeater for years after I left the campus.
Dan KB6NU says
I”m going to e-mail Maxfield and have him look at your replies. It didn’t seem like a big deal to me, either.