aboutsummaryrefslogtreecommitdiff
path: root/cxrefbas.rst
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-06-17 18:48:32 -0400
committerB. Watson <urchlay@slackware.uk>2024-06-17 18:48:32 -0400
commit51436978dd762b0f7ed9ccca60802665bcab3514 (patch)
treeae682448aa6c9ed9145a05205eca27c1aa3de49a /cxrefbas.rst
parent7e359d5a95b28e59d2a3e97bef12f028d2ab0ad0 (diff)
downloadbw-atari8-tools-51436978dd762b0f7ed9ccca60802665bcab3514.tar.gz
cxrefbas: update doc.
Diffstat (limited to 'cxrefbas.rst')
-rw-r--r--cxrefbas.rst32
1 files changed, 30 insertions, 2 deletions
diff --git a/cxrefbas.rst b/cxrefbas.rst
index 62346cd..50c4dbc 100644
--- a/cxrefbas.rst
+++ b/cxrefbas.rst
@@ -18,8 +18,8 @@ DESCRIPTION
**cxrefbas** reads an Atari 8-bit BASIC tokenized program. For each
line number in the program, it prints a list of lines that reference
-it. Each reference is followed by a letter that indicates the type
-of reference:
+it. Each line number reference is followed by a letter that indicates
+the type of reference:
**G**
*GOTO* (without *ON*) or *GO TO*.
@@ -63,6 +63,34 @@ General Options
Verbose operation. When displaying a number in verbose mode, it will
be prefixed with *$* if it's in hex, or no prefix for decimal.
+EXAMPLE
+=======
+
+This program::
+
+ 10 GOSUB 100:GOSUB 200
+ 100 RESTORE 1000:IF A THEN 120
+ 110 GOTO 200
+ 120 ON B GOTO 300,310,320
+ 200 RETURN
+ 300 PRINT 1
+ 310 PRINT 2
+ 1000 DATA XYZ
+
+Produces this output::
+
+ 100: 10:S
+ 120: 100:I
+ 200: 10:S 110:G
+ 300: 120:O
+ 310: 120:O
+ !320: 120:O
+ 1000: 100:R
+
+Note that line 320 doesn't exist in the program, so it's shown with
+*!* in the output. Line 120 has *100:I*; if the *THEN 120* were
+changed to *THEN GOTO 120*, line 120 would read *100:G*.
+
EXIT STATUS
===========