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