aboutsummaryrefslogtreecommitdiff
path: root/listamsb.rst
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-03-05 20:51:47 -0500
committerB. Watson <urchlay@slackware.uk>2025-03-05 20:51:47 -0500
commit334920cf9cb772b75ed4379ace5dd68f521b77d4 (patch)
treeda2c161d3e7e77fd7133393734fe036ad01a49bc /listamsb.rst
parentd053b20b0cd20b8f86f38fcb3982ed3f2c5ebf6d (diff)
downloadbw-atari8-tools-334920cf9cb772b75ed4379ace5dd68f521b77d4.tar.gz
listamsb: add -C (crunch) option.
Diffstat (limited to 'listamsb.rst')
-rw-r--r--listamsb.rst16
1 files changed, 15 insertions, 1 deletions
diff --git a/listamsb.rst b/listamsb.rst
index 960e6dc..23d21fb 100644
--- a/listamsb.rst
+++ b/listamsb.rst
@@ -11,7 +11,7 @@ List the source of a tokenized Atari Microsoft BASIC program
SYNOPSIS
========
-listamsb [**-l**] | [[**-a**\] [**-c**] [**-v**\] [**-h**\] [**-i**\] [**-u**\] [**-t**\] [**-m**\] [**-n**\] [**-s**\] ...] [**-r** *line-range*] [**input-file**\] [**output-file**\]
+listamsb [**-l**] | [**-C**] | [[**-a**\] [**-c**] [**-v**\] [**-h**\] [**-i**\] [**-u**\] [**-t**\] [**-m**\] [**-n**\] [**-s**\] ...] [**-r** *line-range*] [**input-file**\] [**output-file**\]
DESCRIPTION
===========
@@ -50,10 +50,24 @@ OPTIONS
and the exit status is unchanged. It's an error to give an **output-file** with
this option.
+**-C**
+ "Crunch" program: remove comments and spaces that occur outside of a
+ string. The resulting program is usually 5 to 10 percent smaller, and
+ will RUN correctly, but will be difficult to edit in AMSB because its
+ parser requires the spaces. Also, if any comment-only lines are the
+ target of GOTO or GOSUB, the program won't run because all comment-only
+ lines are removed.
+
+ This option must be used with an **output-file**, a pipe, or
+ redirection: **listamsb** will not write tokenized BASIC to a
+ terminal. **a8cat** is not used, with this option. None of the
+ other options have any effect with **-C**.
+
**-r** *line-range*
Show only part of the listing. *line-range* can be a single line, or
a comma- or hyphen-separated pair of starting and ending line numbers (e.g. **100,200**, or
**1000-2000**).
+
If the start line number is omitted (e.g. **,100**), it will be treated as
**0** (meaning, list from the beginning of the program). If the ending line
number is omitted (e.g. **100,**), it means "list until the end of the program".