aboutsummaryrefslogtreecommitdiff
path: root/listbas.rst
blob: d6d17b1bb1c2626b9404b2877211804ce69c787b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
=======
listbas
=======

--------------------------------------------------------
List the source of a tokenized Atari 8-bit BASIC program
--------------------------------------------------------

.. include:: manhdr.rst

SYNOPSIS
========

listbas [**-v**] [**-i**] [**-a** | **-m** ] **input-file**

DESCRIPTION
===========

**listbas** acts like the *LIST* command in BASIC. It reads a
tokenized (SAVEd) BASIC program and prints the code in human-readable
format.

By default, output is piped through **a8cat**\(1), to covert ATASCII
characters into Unicode equivalents. Raw ATASCII and "magazine listing"
mode are also available.

**a8cat** is run as an external processe. The executables is searched
for first in the current directory, and then in *PATH*.

OPTIONS
=======

List options
------------

**-i**
  Include the immediate mode command (line 32768) in the output.

**-a**
  Output raw ATASCII; no translation to the host character set. Must be
  used with redirection; **listbas** will not write ATASCII to the terminal.

**-m**
  Output "magazine listing". Pipes output through **a8cat -m**; see the man
  page for **a8cat** for details.

.. include:: genopts.rst

NOTES
=====

**listbas** will refuse to operate on a LIST-protected program with
scrambled variable names. For code-protected programs, it will stop at
the line with the invalid offset. Use **unprotbas**\(1) to remove the
protection.

**listbas** is similar to Jindroush's **chkbas**\(1). The main differences are:

- **listbas** only supports Atari BASIC, not Turbo BASIC or BASIC XL/XE.

- **listbas** doesn't show information about the variables. Use **vxrefbas**\(1)
  for that.

- **listbas** will not write ATASCII data to your terminal. By default, it uses
  **a8cat**\(1) to convert the output to something human-readable
  that won't confuse the terminal. When outputting raw ATASCII (**-a** option),
  it refuses to run if standard output is a terminal.

- **listbas** only lists line 32768 (the immediate mode command) if
  specifically asked to do so.

- **listbas** doesn't print a banner on startup.

- **listbas** tells you if the program is protected, and refuses to operate
  on variable-protected programs.

EXIT STATUS
===========

0 for success, 1 for failure.

.. include:: manftr.rst