This program is Copyright © 2005 by Jean-Marc Baillard and is used here by permission.
This program is supplied without representation or warranty of any kind. Jean-Marc Baillard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.
-Clifford Stern has written a superb Morse Code program which is listed
in "Synthetic Programming made easy" by Keith Jarett.
-The following "MC" is far from being so good but it uses the ATOX
function of the X-Functions module,
it can transmit more characters and it occupies less program
memory.
-"MC" uses the synthetic TONE P ( decimal codes = 159 , 120 )
for . and the standard TONE 8 for _
-For instance, L = TONE P TONE 8 TONE P TONE
P = . _ . .
-Then, a second routine ( "LMC" ) may help you to learn Morse code.
Warning:
-If the last executed tone is a synthetic tone ( TONE P or another
one ),
my HP-41 emits a strange frrrrrrrr ( press your ear against
your calculator to check )
-Simply execute a BEEP or any non-synthetic TONE to remove this vibration
1°) Morse Code Program
Data Registers: /
Flags: /
Subroutines: /
01 LBL "MC"
02 LBL 00
03 64
04 ATOX
05 X=0?
06 GTO 32
07 X>Y?
08 -
09 XEQ IND X
10 GTO 00
11 LBL 12
L = . _ . .
12 TONE P
13 GTO 04
14 LBL 63
? = . . _ _ . .
15 XEQ 21
16 GTO 04
17 LBL 56
8 = _ _ _ . .
18 TONE 8
19 LBL 26
Z = _ _ . .
20 TONE 8
21 LBL 04
D = _ . .
22 TONE 8
23 GTO 09
24 LBL 59
; = _ . _ . _ .
25 TONE 8
26 LBL 43
+ = . _ . _ .
27 XEQ 18
28 GTO 14
29 LBL 64
@ = . _ _ . _ .
30 XEQ 01
31 LBL 03
C = _ . _ .
32 TONE 8
33 GTO 18
34 LBL 34
" = . _ . . _ .
35 TONE P
36 LBL 47
/ = _ . . _ .
37 TONE 8
38 LBL 06
F = . . _ .
39 TONE P
40 LBL 18
R = . _ .
41 TONE P
42 GTO 14
43 LBL 40
( = _ . _ _ .
44 TONE 8
45 LBL 16
P = . _ _ .
46 TONE P
47 GTO 07
48 LBL 33
! = . . . _ .
49 XEQ 19
50 GTO 14
51 LBL 39
' = . _ _ _ _ .
52 TONE P
53 LBL 57
9 = _ _ _ _ .
54 XEQ 13
55 LBL 07
G = _ _ .
56 TONE 8
57 LBL 14
N = _ .
58 TONE 8
59 GTO 05
60 LBL 58
: = _ _ _ . . .
61 TONE 8
62 LBL 55
7 = _ _ . . .
63 TONE 8
64 LBL 02
B = _ . . .
65 TONE 8
66 GTO 19
67 LBL 54
6 = _ . . . .
68 TONE 8
69 GTO 08
70 LBL 38
& = . _ . . .
71 XEQ 18
72 GTO 09
73 LBL 53
5 = . . . . .
74 TONE P
75 LBL 08
H = . . . .
76 TONE P
77 LBL 19
S = . . .
78 TONE P
79 LBL 09
I = . .
80 TONE P
81 LBL 05
E = .
82 TONE P
83 RTN
84 LBL 46
. = . _ . _ . _
85 XEQ 18
86 GTO 11
87 LBL 31
_ = . . _ _ . _
( underline )
88 XEQ 21
89 GTO 11
90 LBL 41
) = _ . _ _ . _
91 XEQ 14
92 LBL 17
Q = _ _ . _
93 TONE 8
94 LBL 11
K = _ . _
95 TONE 8
96 GTO 01
97 LBL 61
= = _ . . . _
98 TONE 8
99 GTO 22
100 LBL 36
$ = . . . _ . . _
101 XEQ 19
102 LBL 24
X = * = _ . . _
103 LBL 42
104 TONE 8
105 GTO 21
106 LBL 37
% = _ . _ . _
107 XEQ 11
108 GTO 01
109 LBL 45
- = _ . . . . _
110 TONE 8
111 LBL 52
4 = . . . . _
112 TONE P
113 LBL 22
V = . . . _
114 TONE P
115 LBL 21
U = . . _
116 TONE P
117 LBL 01
A = . _
118 TONE P
119 GTO 20
120 LBL 44
, = _ _ . . _ _
121 XEQ 26
122 GTO 13
123 LBL 51
3 = . . . _ _
124 XEQ 19
125 GTO 13
126 LBL 50
2 = . . _ _ _
127 TONE P
128 LBL 10
J = . _ _ _
129 TONE P
130 GTO 15
131 LBL 25
Y = _ . _ _
132 TONE 8
133 LBL 23
W = . _ _
134 TONE P
135 GTO 13
136 LBL 49
1 = . _ _ _ _
137 TONE P
138 GTO 02
139 LBL 48
0 = _ _ _ _ _
140 TONE 8
141 LBL 02
142 TONE 8
143 LBL 15
O = _ _ _
144 TONE 8
145 LBL 13
M = _ _
146 TONE 8
147 LBL 20
T = _
148 TONE 8
149 LBL 32
space = a pause
150 END
( 305 bytes / SIZE 000 )
-Store an alpha string of at most 24 characters in the alpha register
and execute "MC"
-Do not use lower case letters.
-Use XTOA to store special characters in alpha ( for instance,
64 XTOA adds @ to the alpha string )
Example: Place "HEWLETT PACKARD" in the alpha register , XEQ "MC" and you'll hear:
dih dih dih dit dit
dih daah daah dih daah dih dit dit
daah daah
dih daah daah dit dih daah
daah dih daah dit daah dih daah dih
daah dih daah dit daah dih dit
Notes:
-The XEQ IND X ( line 09 ) is much faster if the program is executed
from an HEPAX module.
-You can also transmit a message by groups of at most 6 characters,
after storing them into contiguous registers Rbb thru Ree (
bb > 00 )
LBL "MESSAGE"
STO 00
CLA
LBL 00
ARCL IND 00
XEQ "MC"
ISG 00
GTO 00
END
-Place the control number bbb.eee in X-register and
execute "MESSAGE"
2°) Learning Morse Code
-This short routine transmits a random message of 1 to 24 characters
among 1 2 .... 9 A B C ....... Y Z
-You have to decipher the message.
Data Registers:
• R00 = seed
( initialize R00 before executing LMC )
R01 thru R04 = the characters
Flag: F26
Subroutine: "MC"
01 LBL "LMC"
02 CF 26
03 CLA
04 57
05 LBL 01
06 RCL 00
07 R-D
08 FRC
09 STO 00
10 36
11 *
12 INT
13 48
14 +
15 X<=Y?
16 GTO 01
17 7
18 +
19 LBL 01
20 XTOA
21 RDN
22 DSE Y
23 GTO 01
24 ASTO 01
25 ASHF
26 ASTO 02
27 ASHF
28 ASTO 03
29 ASHF
30 ASTO 04
31 LBL 10
32 CLA
33 ARCL 01
34 ARCL 02
35 ARCL 03
36 ARCL 04
37 SF 26
38 XEQ "MC"
39 END
( 67 bytes / SIZE 005 )
-Place a seed in R00 and the number of characters ( between 1 &
24 ) in X-register and XEQ "LMC"
-Press XEQ 10 to repeat the message.
Example: 1 STO 00 4 XEQ "LMC" >>>> dih daah daah dih daah daah daah daah daah daah dit daah dih daah
-The message is AY9K ( here in R01 )
Reference:
Keith Jarett - "HP-41 Synthetic Programming Made Easy" - Synthetix
Go back to the HP-41 software library
Go back to the general software library
Go
back to the main exhibit hall