aboutsummaryrefslogtreecommitdiff
path: root/dumpbas.1
diff options
context:
space:
mode:
Diffstat (limited to 'dumpbas.1')
-rw-r--r--dumpbas.1157
1 files changed, 106 insertions, 51 deletions
diff --git a/dumpbas.1 b/dumpbas.1
index 9da3e11..b973793 100644
--- a/dumpbas.1
+++ b/dumpbas.1
@@ -73,67 +73,67 @@ Don\(aqt dump lines before \fBstart\-lineno\fP\&. Default: \fI0\fP\&.
Don\(aqt dump lines after \fBstart\-lineno\fP\&. Default: \fI32768\fP\&.
.TP
.B \fB\-l\fP \fIlineno\fP
-Only dump one line. This is exactly equivalent to "\fB\-s\fP \fInum\fP \fB\-e\fP \fInum\fP".
+Only dump one line. This is exactly equivalent to "\fB\-s\fP \fIlineno\fP \fB\-e\fP \fIlineno\fP".
.UNINDENT
.SH FORMATTING
.sp
Every byte in the file is displayed in hex. However, they are grouped by line
and statement, and certain tokens get marker characters to help keep track
-of what they\(aqre for. Strings are displayed in both hex and ASCII. Floating
+of what they\(aqre for. Strings are displayed in quotes, in both hex and ASCII. Floating
point constants are displayed as 6 hex bytes with square brackets around them.
-.sp
-If \fBdumpbas\fP is run on the following program:
+.SS Line Header Markers
.INDENT 0.0
-.INDENT 3.5
-.sp
-.nf
-.ft C
-10 ? "HOW MANY TIMES";:INPUT N
-20 FOR I=1 TO N
-30 ? "HELLO ";:? I;"/";N:NEXT I
-40 REM WAIT FOR KEY
-50 POKE 764,255
-60 ? "PRESS ANY KEY"
-70 IF PEEK(764)=255 THEN 70
-80 POKE 764,255:GOTO 10
-.ft P
-.fi
-.UNINDENT
+.TP
+.B \fB@\fP
+Separates decimal line number from hex file offset.
+.TP
+.B \fB^\fP
+Prefix for line length.
+.TP
+.B \fB(\fP, \fB)\fP
+Surrounds the 2 hex bytes for the line number.
.UNINDENT
-.sp
-\fBNote:\fP The "PRESS ANY KEY" was entered in inverse video.
-.sp
-\&...it produces the following output:
+.SS Statement Markers
.INDENT 0.0
-.INDENT 3.5
-.sp
-.nf
-.ft C
- 10@0021 (0a 00): ^1b
- >17 !28 $0f =0e "H/48 O/4f W/57 /20 M/4d A/41 N/4e Y/59 /20 T/54 I/49 M/4d E/45 S/53" 15 14:
- >1b !02 80 16
- 20@003c (14 00): ^11
- >11 !08 81 2d #0e [40 01 00 00 00 00] 19 80 16
- 30@004d (1e 00): ^1d
- >0f !28 $0f =06 "H/48 E/45 L/4c L/4c O/4f /20" 15 14:
- >19 !28 81 15 $0f =01 "//2f" 15 80 14:
- >1d !09 81 16
- 40@006a (28 00): ^12
- >12 !00 57 41 49 54 20 46 4f 52 20 4b 45 59 9b
- 50@007c (32 00): ^15
- >15 !1f #0e [41 07 64 00 00 00] 12 #0e [41 02 55 00 00 00] 16
- 60@0091 (3c 00): ^15
- >15 !28 $0f =0d "|P/d0 |R/d2 |E/c5 |S/d3 |S/d3 | /a0 |A/c1 |N/ce |Y/d9 | /a0 |K/cb |E/c5 |Y/d9" 16
- 70@00a6 (46 00): ^20
- >20 !07 46 3a #0e [41 07 64 00 00 00] 2c 22 #0e [41 02 55 00 00 00] 1b #0e [40 70 00 00 00 00] 16
- 80@00c6 (50 00): ^1f
- >15 !1f #0e [41 07 64 00 00 00] 12 #0e [41 02 55 00 00 00] 14:
- >1f !0a #0e [40 10 00 00 00 00] 16
-32768@00e5 (00 80): ^0f
- >0f !19 $0f =07 "H/48 :/3a B/42 ./2e B/42 A/41 S/53" 16
-.ft P
-.fi
+.TP
+.B \fB>\fP
+Prefix for next\-statement offset. Every statement begins with this.
+.TP
+.B \fB!\fP
+Prefix for a command token. Every line of BASIC code begins with a
+command.
+.TP
+.B \fB:\fP
+Suffix for the \fI14\fP token; end of statement.
+.TP
+.B \fB#\fP
+Prefix for the \fI0e\fP token, which introduces a BCD floating point constant.
+.TP
+.B \fB[\fP, \fB]\fP
+Surrounds the 6 bytes of a BCD floating point constant.
+.TP
+.B \fB$\fP
+Prefix for the \fI0f\fP token, which introduces a string constant.
+.TP
+.B \fB=\fP
+Prefix for the string\-length byte of a string constant.
.UNINDENT
+.SS String Byte Markers
+.INDENT 0.0
+.TP
+.B \fB"\fP
+A string constant is surrounded by double\-quotes.
+.TP
+.B \fB^\fP
+Prefix for a control character. For instance, \fI03\fP is displayed as \fI^C\fP\&.
+.TP
+.B \fB|\fP
+Prefix for an inverse video character. Example: \fIc1\fP (inverse video \fIA\fP)
+is displayed as \fI|A\fP\&. May be combined with \fI^\fP, for inverse control characters.
+.TP
+.B \fB/\fP
+Separates the printable ASCII representation of a character from its hex byte.
+Example: \fIA/41\fP\&.
.UNINDENT
.SS Line header
.sp
@@ -224,6 +224,61 @@ The actual 6\-byte constant is surrounded with \fI[\fP and \fI]\fP\&.
.IP \(bu 2
The last token is \fI16\fP, which is BASIC\(aqs end\-of\-line token.
.UNINDENT
+.SH EXAMPLE
+.sp
+If \fBdumpbas\fP is run on the following program:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+10 ? "HOW MANY TIMES";:INPUT N
+20 FOR I=1 TO N
+30 ? "HELLO ";:? I;"/";N:NEXT I
+40 REM WAIT FOR KEY
+50 POKE 764,255
+60 ? "PRESS ANY KEY"
+70 IF PEEK(764)=255 THEN 70
+80 POKE 764,255:GOTO 10
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+\fBNote:\fP The "PRESS ANY KEY" was entered in inverse video.
+.sp
+\&...it produces the following output:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+ 10@0021 (0a 00): ^1b
+ >17 !28 $0f =0e "H/48 O/4f W/57 /20 M/4d A/41 N/4e Y/59 /20 T/54 I/49 M/4d E/45 S/53" 15 14:
+ >1b !02 80 16
+ 20@003c (14 00): ^11
+ >11 !08 81 2d #0e [40 01 00 00 00 00] 19 80 16
+ 30@004d (1e 00): ^1d
+ >0f !28 $0f =06 "H/48 E/45 L/4c L/4c O/4f /20" 15 14:
+ >19 !28 81 15 $0f =01 "//2f" 15 80 14:
+ >1d !09 81 16
+ 40@006a (28 00): ^12
+ >12 !00 57 41 49 54 20 46 4f 52 20 4b 45 59 9b
+ 50@007c (32 00): ^15
+ >15 !1f #0e [41 07 64 00 00 00] 12 #0e [41 02 55 00 00 00] 16
+ 60@0091 (3c 00): ^15
+ >15 !28 $0f =0d "|P/d0 |R/d2 |E/c5 |S/d3 |S/d3 | /a0 |A/c1 |N/ce |Y/d9 | /a0 |K/cb |E/c5 |Y/d9" 16
+ 70@00a6 (46 00): ^20
+ >20 !07 46 3a #0e [41 07 64 00 00 00] 2c 22 #0e [41 02 55 00 00 00] 1b #0e [40 70 00 00 00 00] 16
+ 80@00c6 (50 00): ^1f
+ >15 !1f #0e [41 07 64 00 00 00] 12 #0e [41 02 55 00 00 00] 14:
+ >1f !0a #0e [40 10 00 00 00 00] 16
+32768@00e5 (00 80): ^0f
+ >0f !19 $0f =07 "H/48 :/3a B/42 ./2e B/42 A/41 S/53" 16
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
.SH EXIT STATUS
.sp
0 for success, 1 for failure.