MorseRx is the two versions of the receiving programme I wrote first.
Timing is a chapter from a book on programming delays in modern computers. The Atari 800xl sent morse fine as it was because the clock was only running at 1.79Mhz. These days they run at Ghz.
The remaining Program scripts are excerpts from the original (now lost) complete Morse Magic programme. One day I hope to rewrite it in full.
More here Interrupt handling. I would set the Int' timer going for the duration of the dot, dash, or space and do the calculating in the meantime.
Then when the interrupt returned it toggled the transmitter ready for the next duration be it mark or space.
That became the basis of the running programme to send morse.