aboutsummaryrefslogtreecommitdiff
path: root/listamsb.1
diff options
context:
space:
mode:
Diffstat (limited to 'listamsb.1')
-rw-r--r--listamsb.143
1 files changed, 18 insertions, 25 deletions
diff --git a/listamsb.1 b/listamsb.1
index 09d2012..a5d58c6 100644
--- a/listamsb.1
+++ b/listamsb.1
@@ -27,12 +27,12 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
-.TH "LISTAMSB" 1 "2025-03-04" "0.2.1" "Urchlay's Atari 8-bit Tools"
+.TH "LISTAMSB" 1 "2025-03-05" "0.2.1" "Urchlay's Atari 8-bit Tools"
.SH NAME
listamsb \- List the source of a tokenized Atari Microsoft BASIC program
.SH SYNOPSIS
.sp
-listamsb [\fB\-l\fP] | [[\fB\-a\fP] [\fB\-v\fP] [\fB\-h\fP] [\fB\-i\fP] [\fB\-u\fP] [\fB\-t\fP] [\fB\-m\fP] [\fB\-n\fP] [\fB\-s\fP] ...] [\fB\-r\fP \fIline\-range\fP] [\fBinput\-file\fP]
+listamsb [\fB\-l\fP] | [[\fB\-a\fP] [\fB\-c\fP] [\fB\-v\fP] [\fB\-h\fP] [\fB\-i\fP] [\fB\-u\fP] [\fB\-t\fP] [\fB\-m\fP] [\fB\-n\fP] [\fB\-s\fP] ...] [\fB\-r\fP \fIline\-range\fP] [\fBinput\-file\fP] [\fBoutput\-file\fP]
.SH DESCRIPTION
.sp
\fBlistamsb\fP acts like the \fILIST\fP command in Atari Microsoft BASIC. It reads a
@@ -48,59 +48,52 @@ disk\-based version 1 and the cartridge\-based version 2. The language
is the same for both versions, so there\(aqs no need to specify it.
.sp
\fBinput\-file\fP must be a tokenized AMSB program. If no \fBinput\-file\fP is given,
-input is read from stdin.
+input is read from \fBstdin\fP\&.
.sp
Programs created with \fISAVE "filename" LOCK\fP are autodetected,
and will be listed normally. It\(aqs also possible to convert a LOCKed
program to an unencrypted one, with the \fB\-l\fP option.
.sp
-Output is to stdout. Use shell redirection to save the output to a file.
+If no \fBoutput\-file\fP is given, output is to \fBstdout\fP\&.
.SH OPTIONS
.INDENT 0.0
.TP
.B \fB\-a\fP
-Output raw ATASCII. This option must be used with a pipe or redirection, as
-\fBlistamsb\fP will not write ATASCII to a terminal. \fBa8cat\fP is not used,
-with this option.
+Output raw ATASCII. This option must be used with an
+\fBoutput\-file\fP, a pipe, or redirection: \fBlistamsb\fP will not write
+ATASCII to a terminal. \fBa8cat\fP is not used, with this option.
.TP
.B \fB\-c\fP
Check only. No output on stdout. Diagnostics are still printed on stderr,
-and the exit status is unchanged.
+and the exit status is unchanged. It\(aqs an error to give an \fBoutput\-file\fP with
+this option.
.TP
.B \fB\-r\fP \fIline\-range\fP
Show only part of the listing. \fIline\-range\fP can be a single line, or
-a comma\-separated pair of starting and ending line numbers (e.g. \fB100,200\fP).
+a comma\- or hyphen\-separated pair of starting and ending line numbers (e.g. \fB100,200\fP, or
+\fB1000\-2000\fP).
If the start line number is omitted (e.g. \fB,100\fP), it will be treated as
\fB0\fP (meaning, list from the beginning of the program). If the ending line
number is omitted (e.g. \fB100,\fP), it means "list until the end of the program".
-\fB\-r,\fP is equivalent to not using the \fB\-r\fP option at all.
+\fB\-r,\fP or \fB\-r\-\fP is equivalent to not using the \fB\-r\fP option at all.
.TP
.B \fB\-l\fP
"Lock" or "unlock" the program. Locked programs are created with
\fISAVE "filename" LOCK\fP\&. The "encryption" is a reciprocal cipher: locking and
unlocking are the same operation (similar to ROT13). The output will
-be the locked or unlocked tokenized program (rather than a listing),
-and you must use redirection to save it to a file. Example:
-.INDENT 7.0
-.INDENT 3.5
-.sp
-.nf
-.ft C
-listamsb \-l LOCKED.AMB > UNLOCKED.AMB
-.ft P
-.fi
-.UNINDENT
-.UNINDENT
+be the locked or unlocked tokenized program (rather than a listing).
.sp
-\fBa8cat\fP is not used with this option. None of the other options
-have any effect with \fB\-l\fP\&.
+Output raw ATASCII. This option must be used with an
+\fBoutput\-file\fP, a pipe, or redirection: \fBlistamsb\fP will not write
+tokenized BASIC to a terminal. \fBa8cat\fP is not used, with this option.
+None of the other options have any effect with \fB\-l\fP\&.
.TP
.B \fB\-n\fP
No empty line. By default, \fBlistamsb\fP prints an empty line at the
start of the output, to match AMSB\(aqs LIST command.
.TP
.B \fB\-v\fP
-Verbose output, on stderr. May be given twice for extra verbosity,
+Verbose output, on \fBstderr\fP\&. May be given twice for extra verbosity,
which shows each line number, its offset, length, and end\-of\-line pointer.
.TP
.B \fB\-h\fP, \fB\-\-help\fP