MORSE 800........

BY ROBERT E. ALLEGER


MORSE 800 is a MORSE code practice program for your ATARI 400/800 computer. It is written in BASIC and interfaces with a very simple machine, language timing routine. The program only requires 7461 bytes of RAM and therefore will even run on a 16K cassette based system.

All comments/ suggestions are welcome. Send them to the address below. Replies are not guaranteed without an SASE.
Bob Alleger WB2JMU
207 Blue Jay Lane
Mt. Holly, NJ 08060

After initialization, a menu is presented on your screen. Enter a 1 to change parameters, 2 to receive English words, 3 to receive random characters, 4 to receive text, or 5 to define a body of practice text.

Option 1 is used to change the parameters used in outputting MORSE code sounds. To make a change, type in the new value for a parameter, to keep a particular parameter the same, hit a carriage return. The program is initialized with the following defaults.

words per minute = 13 (range 1-43)
DAH weight = 3
character space weight = 3
word space weight = 7
frequency of tone = 55 (range 0-255)

The values above are normally used. A dit is the smallest unit of time. A dah is 3 times the length of a dit. The space between a MORSE code element (i.e. the space between the dit and the dah in the letter A) is equal in length to a dit. The space between characters is 3 times the length of a dit. The space between words is 7 times the length of a dit. When you go beyond 13 wpm it is common practice to alter one or more of the above parameters, such as the character space weight or word space weight.

Option 2 will allow you to practice with the 104 5 character words stored in DATA statements.

Option 3 will use 5-character words made up of random letters and numbers for practice.

Option 4 will use a body of text previously entered, using option 5, for practice.

Option 5 will allow you to enter a body of text to be used in practice. All text should be entered without hitting the carriage return. All corrections must be made by using the back space key. When you are done entering text, hit a carriage return. The maximum amount of text that can be entered is 911 characters.

NOTE - In options 2 and 3, hitting a "I"' will pause the program after the current word is sounded. Hitting another "I"' will cause it to continue. Hitting an "M" at any time will return you to the menu after the current word is sounded.

The number of words used in option 2 can be expanded by changing the variable NBRWORDS in line 170 and adding additional DATA statements.

MAJOR VARIABLES (strings)

CHAR$( a string of all characters that can be used for practice in option 3. If you do not want to allow numbers to be used for' practice (NOVICEs 7), or if you want to allow punctuation, just change line 230 to include  only those characters that you want.

ML$( the machine language code for the timing loop is stored in this string. A typical statement such as "X=USR(ADR(ML$),DITLENGTH is used to access the routine.

MORSE$( a string of MORSE character codes. Each string element is 6 characters long. The contents of each element is any combination of "1"s and "3"s with the trailing unused positions padded with "0"s. A - 1 " represents a dit (or dot) and a "3" represents a dah (or dash). A "0" signifies the end of this MORSE character.

String Element Contents
1 comma
3 - 4 period, and slash
5 - 14 the numbers 0 to 9
15 question mark
16 - 47 the letters A to Z

SEND$( used to store a string of characters to be translated into MORSE sounds.

WORDS$( a string of English words in 5 character groups to be used for practice.

MAJOR VARIABLES (numeric)

CHARSPACE - length of space between characters
CSWEIGHT - use in - CHARSPACE = DITLENGTH * CSWEIGHT
DAHLENGTH - length of a dah
DAHWEIGHT - used in - DAHLENGTH = DITLENGTH * DAHWEIGHT
DITLENGTH - length of a dit
ELEMSPACE - length of the space between elements of a MORSE character
FREQ - pitch of the tone produced through your TV speaker
NBRWORDS - number of English words in the DATA statements
WORDSPACE - length of the space between words
WPM - speed in words per minute
WSWEIGHT - used in - WORDSPACE = DITLENGTH * WSWEIGHT

TAKE-A-PART

#30 - transfers control to the Initialization section.

#40-150 - the subroutine that translates ASCII strings into MORSE code sounds. It is defined at the Beginning of the program so that the BASIC interpreter does not waste any time in searching for the Beginning line number of the routine when a GOSUB is issued. It calls the machine language routine to provide the timing between MORSE elements, characters, words, and the duration of a dit or dah.

#160-240 - the Initialization section does the following:
-sets the default values for: CSWEIGHT=3 DAHWEIGHT=3 FREQ=55 NBRWORDS=104 WPM=13 WSWEIGHT=7
- reads in the machine language routine from DATA statements.
- reads in the MORSE characters from DATA statements.
- reads in English words from DATA statements.
- transfers execution to calculate timing values used in MORSE translation.

#250-390 - this is the Menu section. It makes use of an 'INKEY$' type of routine to input the users choice and calls the routine on line #1030-1050 to flash portions of the screen.

#400-560 - this is the Change Parameters routine. It allows the user to make changes to various operating parameters and to calculate those variables used in timing of the MORSE code sounds. These variables are CHARSPACE, DITLENGTH, DAHLENGTH, ELEMSPACE, and WORDSPACE.

The formula on line #490 was derived from the relationship of the delay loop value vs. words per minute. I modified the program to send a continuous stream of dits. On page #356 of the 1978 "The Radio Amateur's Handbook" it says that the code speed can be found from SPEED (wpm) = (DOTS/min.) / 25. I produced a table of relationships and then fed them through a program that gave me the formula with the highest correlation.

#570-750 - this is the Receiving Practice routine.

#760-930 - the Define a Body of Text routine allows the user to enter a body of English text to be used for practice purposes.

#940-1050 - the Presentation routine starts the program by presenting the user with the name of the program and copyright statement.

The "POKE 756,192" on line #950 changes the ATARI's character generator base register and is responsible for the "funny" screen at the beginning of the presentation. Line #1020 will restore the screen to normal.

The "POKE 752,1 " in line #950 turns the cursor off.

The routine at #1030-1050 flashes the copyright statement while the DATA statements are being processed and other variables are being set up. This is accomplished by POKEing a 0 or 2 into location 755 (CHACT). This location, among other things, will display all reverse video characters as normal reverse or non-reverse characters.

# 1060-15 20 - DATA statements for the machine language routine, the MORSE code translation table, and a group of English words used for practice.

MACHINE LANGUAGE SUBROUTINE

Note that an ORG statement is not used because this routine is completely relocatable. Also, FRO is being used as free page zero space because this routine does not make use of any floating point math.


Previous | Contents | Next

Original text copyright 1984 by ANALOG Computing. Reprinted with permission by the Digital ANALOG Archive.