From 63dc39eae5df00607a531f86841191aa30da00db Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 27 Feb 2025 02:11:46 -0500 Subject: listamsb: support "locked" programs. --- listamsb.1 | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'listamsb.1') diff --git a/listamsb.1 b/listamsb.1 index 112febd..cc12fb1 100644 --- a/listamsb.1 +++ b/listamsb.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LISTAMSB" 1 "2025-02-26" "0.2.1" "Urchlay's Atari 8-bit Tools" +.TH "LISTAMSB" 1 "2025-02-27" "0.2.1" "Urchlay's Atari 8-bit Tools" .SH NAME listamsb \- List the source of a tokenized Atari Microsoft BASIC program .SH SYNOPSIS @@ -50,6 +50,10 @@ is the same for both versions, so there\(aqs no need to specify it. \fBinput\-file\fP must be a tokenized AMSB program. If no \fBinput\-file\fP is given, input is read from stdin. .sp +Programs created with \fISAVE "filename" LOCK\fP are autodetected, +and will be listed normally. It\(aqs also possible to convert a LOCKed +program to an unencrypted one, with the \fB\-l\fP option. +.sp Output is to stdout. Use shell redirection to save the output to a file. .SH OPTIONS .INDENT 0.0 @@ -71,6 +75,25 @@ If the start line number is omitted (e.g. \fB,100\fP), it will be treated as number is omitted (e.g. \fB100,\fP), it means "list until the end of the program". \fB\-r,\fP is equivalent to not using the \fB\-r\fP option at all. .TP +.B \fB\-l\fP +"Lock" or "unlock" the program. Locked programs are created with +\fISAVE "filename" LOCK\fP\&. The "encryption" is reversible: locking and +unlocking are the same operation. The output will be the unlocked tokenized +program (rather than a listing), and you must +use redirection to save it to a file. Example: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +listamsb \-u LOCKED.AMB > UNLOCKED.AMB +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +None of the other options have any effect with \fB\-u\fP\&. +.TP .B \fB\-v\fP Verbose output, on stderr. .TP @@ -94,10 +117,10 @@ generally mean the input isn\(aqt actually an tokenized Atari Microsoft BASIC file. .INDENT 0.0 .IP \(bu 2 -not an AMSB file: first byte not $00 +not an AMSB file: first byte not $00 or $01 .sp -Pretty self\-explanatory: if the file doesn\(aqt begin with a \fI$00\fP byte, -it\(aqs not a tokenized AMSB file. +Pretty self\-explanatory: if the file doesn\(aqt begin with a \fI$00\fP or +\fI$01\fP byte, it\(aqs not a tokenized AMSB file. .IP \(bu 2 not an AMSB file: too big (\fIN\fP bytes), won\(aqt fit in Atari memory .sp -- cgit v1.2.3