Merge branch 'vendor/ELFTOOLCHAIN'
[dragonfly.git] / games / morse / morse.6
1 .\" Copyright (c) 2000 Alexey Zelkin.  All rights reserved.
2 .\" Copyright (c) 1988, 1991, 1993
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. Neither the name of the University nor the names of its contributors
14 .\"    may be used to endorse or promote products derived from this software
15 .\"    without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" SUCH DAMAGE.
28 .\"
29 .\"     @(#)bcd.6       8.1 (Berkeley) 5/31/93
30 .\" $FreeBSD: src/games/morse/morse.6,v 1.4.2.7 2003/01/26 02:57:27 keramida Exp $
31 .\"
32 .Dd October 19, 2014
33 .Dt MORSE 6
34 .Os
35 .Sh NAME
36 .Nm morse
37 .Nd reformat input as morse code
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl elops
41 .Op Fl P Ar dspdevice
42 .Op Fl d Ar device
43 .Op Fl w Ar speed
44 .Op Fl W Ar speed
45 .Op Fl f Ar frequency
46 .Op Ar string ...
47 .Sh DESCRIPTION
48 The command
49 .Nm
50 read the given input and reformat it in the form of morse code.
51 Acceptable input are command line arguments or the standard input.
52 .Pp
53 Available options:
54 .Bl -tag -width flag
55 .It Fl l
56 The
57 .Fl l
58 option produces output suitable for
59 .Xr led 4
60 devices.
61 .It Fl s
62 The
63 .Fl s
64 option produces dots and dashes rather than words.
65 .It Fl o
66 Write 16bit signed, 44.1kHz native endian sound data
67 to the file specified by
68 .Fl P ,
69 or, if not specified, to standard out.
70 .It Fl p
71 Send morse the real way. This only works if your system has
72 .Xr sound 4
73 support.
74 .It Fl P Ar dspdevice
75 Select a different dsp device from the default
76 .Pa /dev/dsp .
77 .It Fl w Ar speed
78 Set the sending speed in words per minute. If not specified the default
79 speed of 20 WPM is used.
80 .It Fl W Ar speed
81 Enable Farnsworth keying.
82 The argument to
83 .Fl w
84 will set the character keying speed and the argument to
85 .Fl W
86 will set the spacing between character and words.
87 .It Fl f Ar frequency
88 Set the sidetone frequency to something other than the default 600 Hz.
89 .It Fl d Ar device
90 Similar to
91 .Fl p ,
92 but use the RTS line of
93 .Ar device
94 (which must by a tty device)
95 in order to emit the morse code.
96 .It Fl e
97 echo each character before it is sent, used together with either
98 .Fl p
99 or
100 .Fl d .
101 .El
102 .Pp
103 The
104 .Fl w ,
105 .Fl W ,
106 and
107 .Fl f
108 flags only work in conjunction with either the
109 .Fl p
110 or the
111 .Fl d
112 flag.
113 .Pp
114 Not all prosigns have corresponding characters. Use
115 angle brackets to create a ligature, like
116 .Ql <KA> .
117 The more common prosigns are
118 .Ql =
119 for
120 .Em BT ,
121 .Ql \&(
122 for
123 .Em KN
124 and
125 .Ql +
126 for
127 .Em AR .
128 .Pp
129 Using flag
130 .Fl d Ar device
131 it is possible to key an external device, like a sidetone generator with
132 a headset for training purposes, or even your ham radio transceiver.  For
133 the latter, simply connect an NPN transistor to the serial port
134 .Ar device ,
135 emitter connected to ground, base connected through a resistor
136 (few kiloohms) to RTS, collector to the key line of your transceiver
137 (assuming the transceiver has a positive key supply voltage and is keyed
138 by grounding the key input line).  A capacitor (some nanofarads) between
139 base and ground is advisable to keep stray RF away,
140 and to suppress the
141 minor glitch that is generated during program startup.
142 .Sh ENVIRONMENT
143 If your
144 .Ev LC_CTYPE
145 locale codeset is
146 .Ql KOI8-R ,
147 characters with the high-order bit set are interpreted as
148 Cyrillic characters.  If your
149 .Ev LC_CTYPE
150 locale codeset is
151 .Ql ISO8859-1
152 compatible,
153 they are interpreted
154 as belonging to the
155 .Ql ISO-8859-1
156 character set.
157 .Sh SEE ALSO
158 .Xr sound 4
159 .Sh HISTORY
160 Sound support for
161 .Nm
162 added by
163 .An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq Mt lyndon@orthanc.com
164 and later converted to use
165 .Xr sound 4
166 by
167 .An Simon 'corecode' Schubert Aq Mt corecode@fs.ei.tum.de .
168 .Pp
169 Ability to key an external device added by
170 .An J\(:org Wunsch
171 (DL8DTL).
172 .Sh BUGS
173 Only understands a few European characters
174 (German and French),
175 no Asian characters,
176 and no continental landline code.
177 .Pp
178 Sends a bit slower than it should due to system overhead. Some people
179 would call this a feature.