From c1cb377c4b108e78dbc2009cfb41e5de1c7e59c5 Mon Sep 17 00:00:00 2001 From: B. Watson Date: Mon, 30 Aug 2021 04:45:13 -0400 Subject: development/dis: Add man page. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- development/dis/dis.1 | 192 +++++++++++++++++++++++++++++++++++++++++ development/dis/dis.SlackBuild | 12 ++- development/dis/dis.rst | 154 +++++++++++++++++++++++++++++++++ 3 files changed, 354 insertions(+), 4 deletions(-) create mode 100644 development/dis/dis.1 create mode 100644 development/dis/dis.rst diff --git a/development/dis/dis.1 b/development/dis/dis.1 new file mode 100644 index 0000000000..d1d9b862af --- /dev/null +++ b/development/dis/dis.1 @@ -0,0 +1,192 @@ +.\" 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 "DIS" 1 "2021-08-30" "0.6" "SlackBuilds.org" +.SH NAME +dis \- dis - statically tracing 6502 disassembler +.\" RST source for dis(1) man page. Convert with: +. +.\" rst2man.py dis.rst > dis.1 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.SH SYNOPSIS +.sp +dis [\fI\-options\fP] file ... +.SH DESCRIPTION +.sp +dis creates XASM/MADS\-compatible assembly code from a memory dump or +an executable. dis statically traces execution paths starting from +code entry points to mark which memory locations contain code. All +other memory is treated as data. dis traces through JMP, JSR and BXX +branch instructions. It stops at RTS, RTI and illegal instructions. +.sp +dis automatically determines common code entry points when +disassembling Atari XEX/SAP files and Commodore 64 PRG files. +.sp +The disassembly is written to standard output. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \fI\-c\fP \fBL=XXXX\fP +Code entry point(s) +.TP +.B \fI\-d\fP \fBL=XXXX\fP +Data location(s) \- Disallow tracing as code +.TP +.B \fI\-C\fP \fBL=XXXX\fP +Constant value(s) +.TP +.B \fI\-v\fP \fBL=XXXX\fP +Vector(s), e.g. FFFA +.TP +.B \fI\-A\fP \fBL=XXXX\fP +Data address(es) +.TP +.B \fI\-P\fP \fBL=XXXX\fP +Code address(es) \- Trace target as code +.TP +.B \fI\-o\fP \fBL=XXXX\fP +Origin for raw files +.TP +.B \fI\-l\fP +Create labels +.TP +.B \fI\-i\fP +Emit illegal opcodes +.TP +.B \fI\-t\fP \fBTYPE\fP +Disassemble as TYPE: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +xex \- Atari executable (\-x) +sap \- Atari SAP file +prg \- Commodore 64 executable (\-p) +raw \- raw memory +.ft P +.fi +.UNINDENT +.UNINDENT +.TP +.B \fI\-x\fP +Disassemble as Atari executable (same as \fB\-t xex\fP) +.TP +.B \fI\-p\fP +Disassemble as Commodore 64 executable (same as \fB\-t prg\fP) +.TP +.B \fI\-comment\fP +Emit comments +.TP +.B \fI\-call\fP +Emit callers +.TP +.B \fI\-access\fP +Emit accessors +.TP +.B \fI\-extern\fP +Emit labels for out\-of\-range addresses +.TP +.B \fI\-rangelabels\fP +Emit labels for ranges instead of base+offset +.TP +.B \fI\-verbose\fP +Print info to STDERR +.TP +.B \fI\-dump\fP +Print options in format for \-a +.TP +.B \fI\-dumpequ\fP +Print equ statements for all labels +.TP +.B \fI\-headers\fP +Print opt h\- if disabled with \-noheaders +.TP +.B \fI\-a\fP \fBFILE\fP +Read options from FILE. Lines are: OPTION VALUE. If \fBFILE\fP +is not found, it will be searched for in \fB/usr/share/dis\fP instead. +.UNINDENT +.sp +Addresses may include a range, e.g. table=$300+F +.sp +Addresses may include xex segment number, e.g. 3:1FAE +.sp +Addresses for \-A and \-P may be given as HIGH_LOW, e.g. 3C64_3C62 +.SH FILES +.INDENT 0.0 +.TP +.B \fB/usr/share/dis/*.dop\fP +Predefined option files for various platforms, for use with \fI\-a\fP\&. +These include: +.INDENT 7.0 +.INDENT 3.5 +sys.dop, hardware.dop: for use with Atari 8\-bit object code. +.sp +6510.dop, cia.dop, sid.dop, vic.dop: for use with Commodore 64 object code. +.UNINDENT +.UNINDENT +.UNINDENT +.SH COPYRIGHT +.sp +See the file /usr/doc/dis\-0.6/LICENSE.md for license information. +.SH AUTHORS +.sp +dis was written by Lyren Brown. +.sp +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. +.SH SEE ALSO +.sp +The full documentation for \fBdis\fP: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +/usr/doc/dis\-0.6/README.md +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +The AtariAge thread: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +http://atariage.com/forums/topic/232658\-statically\-tracing\-6502\-disassembler/ +.ft P +.fi +.UNINDENT +.UNINDENT +.\" Generated by docutils manpage writer. +. diff --git a/development/dis/dis.SlackBuild b/development/dis/dis.SlackBuild index 36ab63b500..6e47a1e1d2 100644 --- a/development/dis/dis.SlackBuild +++ b/development/dis/dis.SlackBuild @@ -10,16 +10,13 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=dis VERSION=${VERSION:-0.6} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} # no compiled code here ARCH=noarch -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -44,6 +41,8 @@ cd $PRGNAM-$RELEASE chown -R root:root . chmod 644 * +sed -i 's,Dissasseble,Disassemble,g' $PRGNAM README* + patch -p1 < $CWD/usr_share.diff # look for .dop files also in /usr/share/dis # manual install @@ -52,6 +51,11 @@ install -m0755 $PRGNAM $PKG/usr/bin install -m0644 *.dop $PKG/usr/share/$PRGNAM install -m0644 *.md $PKG/usr/doc/$PRGNAM-$VERSION +# uh, and now manual (page) install. The man page was made from README.md +# by the SlackBuild author. +mkdir -p $PKG/usr/man/man1 +gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/development/dis/dis.rst b/development/dis/dis.rst new file mode 100644 index 0000000000..f98570752f --- /dev/null +++ b/development/dis/dis.rst @@ -0,0 +1,154 @@ +.. RST source for dis(1) man page. Convert with: +.. rst2man.py dis.rst > dis.1 +.. rst2man.py comes from the SBo development/docutils package. + +.. |version| replace:: 0.6 +.. |date| date:: + +=== +dis +=== + +------------------------------------------ +dis - statically tracing 6502 disassembler +------------------------------------------ + +:Manual section: 1 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +dis [*-options*] file ... + +DESCRIPTION +=========== + +dis creates XASM/MADS-compatible assembly code from a memory dump or +an executable. dis statically traces execution paths starting from +code entry points to mark which memory locations contain code. All +other memory is treated as data. dis traces through JMP, JSR and BXX +branch instructions. It stops at RTS, RTI and illegal instructions. + +dis automatically determines common code entry points when +disassembling Atari XEX/SAP files and Commodore 64 PRG files. + +The disassembly is written to standard output. + +OPTIONS +======= + +*-c* **L=XXXX** + Code entry point(s) + +*-d* **L=XXXX** + Data location(s) - Disallow tracing as code + +*-C* **L=XXXX** + Constant value(s) + +*-v* **L=XXXX** + Vector(s), e.g. FFFA + +*-A* **L=XXXX** + Data address(es) + +*-P* **L=XXXX** + Code address(es) - Trace target as code + +*-o* **L=XXXX** + Origin for raw files + +*-l* + Create labels + +*-i* + Emit illegal opcodes + +*-t* **TYPE** + Disassemble as TYPE:: + + xex - Atari executable (-x) + sap - Atari SAP file + prg - Commodore 64 executable (-p) + raw - raw memory + +*-x* + Disassemble as Atari executable (same as **-t xex**) + +*-p* + Disassemble as Commodore 64 executable (same as **-t prg**) + +*-comment* + Emit comments + +*-call* + Emit callers + +*-access* + Emit accessors + +*-extern* + Emit labels for out-of-range addresses + +*-rangelabels* + Emit labels for ranges instead of base+offset + +*-verbose* + Print info to STDERR + +*-dump* + Print options in format for -a + +*-dumpequ* + Print equ statements for all labels + +*-headers* + Print opt h- if disabled with -noheaders + +*-a* **FILE** + Read options from FILE. Lines are: OPTION VALUE. If **FILE** + is not found, it will be searched for in **/usr/share/dis** instead. + +Addresses may include a range, e.g. table=$300+F + +Addresses may include xex segment number, e.g. 3:1FAE + +Addresses for -A and -P may be given as HIGH_LOW, e.g. 3C64_3C62 + +FILES +===== + +**/usr/share/dis/\*.dop** + Predefined option files for various platforms, for use with *-a*. + These include: + + sys.dop, hardware.dop: for use with Atari 8-bit object code. + + 6510.dop, cia.dop, sid.dop, vic.dop: for use with Commodore 64 object code. + +COPYRIGHT +========= + +See the file /usr/doc/dis-|version|/LICENSE.md for license information. + +AUTHORS +======= + +dis was written by Lyren Brown. + +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. + +SEE ALSO +======== + +The full documentation for **dis**:: + + /usr/doc/dis-0.6/README.md + +The AtariAge thread:: + + http://atariage.com/forums/topic/232658-statically-tracing-6502-disassembler/ -- cgit v1.2.3