aboutsummaryrefslogtreecommitdiff
path: root/jindroush/man/chkbas.1
blob: 1f5313afc1438e3423b50dd7dbd079d4e9fe3d56 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "CHKBAS" 1 "2024-06-25" "1.10" "Jindroush's Atari 8-bit tools"
.SH NAME
chkbas \- check and detokenize Atari BASIC SAVEd files
.SH SYNOPSIS
.sp
chkbas [\fB\-atari\fP] [\fB\-short\fP] [\fB\-verbose\fP] [\fB\-noinverse\fP] [\fB\-tbs\fP | \fB\-bxl\fP | \fB\-bxe\fP] \fBbasic\-file\fP [\fBoutput\-file\fP]
.SH DESCRIPTION
.sp
\fBchkbas\fP detokenizes Atari 8\-bit BASIC SAVEd files. It lists the BASIC
code in human\-readable form, and gives some other useful information
about the program.
.sp
\fBbasic\-file\fP is an Atari BASIC, TurboBASIC, BASIC XL, or BASIC
XE program. Output will go to \fBoutput\-file\fP, if given; otherwise,
standard output. If \fBbasic\-file\fP is anything other than standard
Atari BASIC, the BASIC dialect must be specified (see \fBOPTIONS\fP,
below).
.sp
Sample run, with no options:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ chkbas HELLO.BAS
chkbas v1.10 (c) 1999\-2001 Jindrich Kubec <kubecj@asw.cz>

chkbas v1.10 (c) 1999\-2001 Jindrich Kubec <kubecj@asw.cz>
Atari Basic/Turbo Basic/Basic XL/Basic XE decompiler.
  Latest version can be found at http://www.asw.cz/~kubecj
  Published under GPL. See GPL.TXT.
  Thanks to Russ Gilbert for his SALVAGE programs.

Input file: HELLO.BAS

Constants & pointers:
Start of Name Table      (VNT)   : 000E
End of Name Table        (VNTE)  : 0011
Length of Name Table     (VNTL)  : 0004
Start of Variable Table  (VVT)   : 0012
End of Variable Table    (VVTE)  : 0021
Length of Variable Table (VVTL)  : 0010
Number of Variables      (NV)    : 0002
Start of Code            (STMTAB): 0022
Length of Code                   : 004E
Current command          (STMCUR): 0070
Length of current command        : 0013
First byte after program (STARP) : 0083
Length of file                   : 0083
File len difference              : 00000000

Variable table:
0001 STRING   (81) 00: SPoff: 0000 Len: 5 Dim: 10  A$
0002 SCALAR   (00) 01: 11 I

Main code starts here:
10 DIM A$(10)
20 A$="HELLO"
30 FOR I=1 TO 10
40 ? A$;" WORLD!"
50 NEXT I

Immediate code starts here:
32768 SAVE "H:HELLO.BAS"

Done!
.ft P
.fi
.UNINDENT
.UNINDENT
.SH OPTIONS
.SS Input Options
.INDENT 0.0
.TP
.B \fB\-tbs\fP
Treat input as a Turbo BASIC program.
.TP
.B \fB\-bxl\fP
Treat input as a BASIC XL program.
.TP
.B \fB\-bxe\fP
Treat input as a BASIC XE program, which may or may not be EXTENDed
with code in the extra XE banks.
.UNINDENT
.SS Output Options
.INDENT 0.0
.TP
.B \fB\-atari\fP
Output only the program listing, with lines terminated by Atari
EOL characters (\fB$9B\fP).
.TP
.B \fB\-short\fP
Output only the program listing, with lines terminated by the
system default newline character(s), e.g. \fBn\fP on UNIX\-like OSes,
\fBrn\fP on MS\-DOS or Windows.
.TP
.B \fB\-verbose\fP
Program listing will be interspersed with per\-line and per\-statement
low\-level information. This option is probably most useful for debugging
\fBchkbas\fP itself.
.UNINDENT
.SH EXIT STATUS
.sp
Zero for success, non\-zero for failure.
.SH COPYRIGHT
.sp
This utility is released under the GNU General Public License.
.SH AUTHORS
.sp
This utility was written by Jindrich Kubec, AKA Jindroush.
.sp
This page was written by B. Watson <\fI\%urchlay@slackware.uk\fP>.
.SH SEE ALSO
.sp
\fBacvt\fP(1),
\fBaext\fP(1),
\fBbas2boot\fP(1),
\fBchkbas\fP(1),
\fBchkexe\fP(1),
\fBchkrom\fP(1).
.\" Generated by docutils manpage writer.
.