diff options
Diffstat (limited to 'listbas.rst')
-rw-r--r-- | listbas.rst | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/listbas.rst b/listbas.rst index 1a7a5c8..558d053 100644 --- a/listbas.rst +++ b/listbas.rst @@ -11,7 +11,7 @@ List the source of a tokenized Atari 8-bit BASIC program SYNOPSIS ======== -listbas [**-a** | **-d** | **-m** | **-x** | **-U**] [**-B**] [**-u**] [**-i**] [**-l**] [**-n** | **-C**] [**-v**] [**-c** *colors*] **input-file** +listbas [**-a** | **-d** | **-m** | **-x** | **-U**] [**-B**] [**-u**] [**-i**] [**-l**] [**-n** | **-C**] [**-v**] [**-c** *colors*] [**-r** *line-range*] **input-file** DESCRIPTION =========== @@ -54,8 +54,17 @@ BASIC options See **BASIC DIALECTS** below for details. +**-r** *line-range* + Show only part of the listing. *line-range* can be a single line, or + a comma-separated pair of starting and ending line numbers (e.g. **100,200**). + 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". + **-r,** is equivalent to not using the **-r** option at all. + **-i** - Include the immediate mode command (line 32768) in the output. + Include the immediate mode command (line 32768) in the output. This option has no + effect if the **-r** option is used to stop listing before the end of the program. **-l** Do not print line numbers at the start of each line. **GOTO**, **GOSUB**, @@ -253,6 +262,30 @@ point. Once there are 60 or so levels of indent, it stops adding more. **listbas** doesn't emulate this behaviour (shouldn't be a problem, it's a pathological case). +BASIC XL actually does indentation within a line. If you write:: + + 10 IF A:IF B:IF C:REM + +...BXL lists it as:: + + 10 If A: If B: If C:Rem + +**listbas** only indents at the start of a line, so this behaviour is +not emulated. + +One thing **listbas** gets right: the **LIST** command in Turbo, A+, +BXL, and BXE always starts out with 0 indent spaces, if you're only +listing part of a program. BXE example:: + + 10 While 1 + 20 If Peek(764)<>255 + 30 ? "SOMEONE PRESSED A KEY":Poke 764,255 + 40 Endif + 50 Endwhile + +...but if you give a **LIST 30** in BXE, you'll get line 30 without any +indentation. **listbas** does this, too, if you use the **-r** option. + Protected Programs ------------------ |