development/dis6502: Added (flow-tracing disassembler for 6502).

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
B. Watson 2017-09-08 23:21:10 +01:00 committed by David Spencer
parent 8c4baf35c6
commit a9efa8d569
10 changed files with 961 additions and 0 deletions

View File

@ -0,0 +1,10 @@
dis6502 (flow-tracing disassembler for 6502)
dis6502 is a 6502 disassembler that supports Atari 8-bit and Commodore
executables, as well as raw memory dumps. It attempts to separate code
sections from data by tracing the flow of execution, and supports a config
file for manually defining code sections that aren't reached by the trace.
Note: This is NOT the dis6502 from AtariMax. Although the name is the
same, AtariMax's disassembler is completely different (for one thing,
it's a Windows GUI application).

View File

@ -0,0 +1,414 @@
LINZBS .equ 0
NGFLAG .equ 1
CASINI .equ 2
RAMLO .equ 4
TRAMSZ .equ 6
TSTDAT .equ 7
WARMST .equ 8
BOOTQ .equ 9
DOSVEC .equ 10
DOSINI .equ 12
APPMHI .equ 14
POKMSK .equ 16
BRKKEY .equ 17
RTCLOK .equ 18
BUFADR .equ 21
ICCOMT .equ 23
DSKFMS .equ 24
DSKUTL .equ 26
PTIMOT .equ 28
ABUFPT .equ 28
PBPNT .equ 29
PBUFSZ .equ 30
PTEMP .equ 31
ZIOCB .equ 32
ICHIDZ .equ 32
ICDNOZ .equ 33
ICCOMZ .equ 34
ICSTAZ .equ 35
ICBALZ .equ 36
ICBAHZ .equ 37
ICPTLZ .equ 38
ICPTHZ .equ 39
ICBLLZ .equ 40
ICBLHZ .equ 41
ICAX1Z .equ 42
ICAX2Z .equ 43
ICSPRZ .equ 44
ICIDNO .equ 46
CIOCHR .equ 47
STATUS .equ 48
CHKSUM .equ 49
BUFRLO .equ 50
BUFRHI .equ 51
BFENLO .equ 52
BFENHI .equ 53
CRETRY .equ 54
XL_LTEMP .equ 54
DRETRY .equ 55
BUFRFL .equ 56
RECVDN .equ 57
XMTDON .equ 58
CHKSNT .equ 59
NOCKSM .equ 60
BPTR .equ 61
FTYPE .equ 62
FEOF .equ 63
FREQ .equ 64
SOUNDR .equ 65
CRITIC .equ 66
FMSZPG .equ 67
CKEY .equ 74
XL_ZCHAIN .equ 74
CASSBT .equ 75
DSTAT .equ 76
ATRACT .equ 77
DRKMSK .equ 78
COLRSH .equ 79
TMPCHR .equ 80
HOLD1 .equ 81
LMARGN .equ 82
RMARGN .equ 83
ROWCRS .equ 84
COLCRS .equ 85
DINDEX .equ 87
SAVMSC .equ 88
OLDROW .equ 90
OLDCOL .equ 91
OLDCHR .equ 93
OLDADR .equ 94
NEWROW .equ 96
XL_FKDEF .equ 96
NEWCOL .equ 97
XL_PALNTS .equ 98
LOGCOL .equ 99
MLTTMP .equ 102
OPNTMP .equ 102
SAVADR .equ 104
RAMTOP .equ 106
BUFCNT .equ 107
BUFSTR .equ 108
BITMSK .equ 110
SHFAMT .equ 111
ROWAC .equ 112
COLAC .equ 114
ENDPT .equ 116
DELTAR .equ 118
DELTAC .equ 119
ROWINC .equ 121
XL_KEYDEF .equ 121
COLINC .equ 122
SWPFLG .equ 123
HOLDCH .equ 124
INSDAT .equ 125
COUNTR .equ 126
ZROFRE .equ 128
FPZRO .equ 212
FR0 .equ 212
FRE .equ 218
FR1 .equ 224
FR2 .equ 230
FRX .equ 236
EEXP .equ 237
NSIGN .equ 237
ESIGN .equ 239
FCHFLG .equ 240
DIGRT .equ 241
CIX .equ 242
INBUFF .equ 243
ZTEMP1 .equ 245
ZTEMP4 .equ 247
ZTEMP3 .equ 249
DEGFLG .equ 251
RADFLG .equ 251
FLPTR .equ 252
FPTR2 .equ 254
INTABS .equ 512
VDSLST .equ 512
VPRCED .equ 514
VINTER .equ 516
VBREAK .equ 518
VKEYBD .equ 520
VSERIN .equ 522
VSEROR .equ 524
VSEROC .equ 526
VTIMR1 .equ 528
VTIMR2 .equ 530
VTIMR4 .equ 532
VIMIRQ .equ 534
CDTMV1 .equ 536
CDTMV2 .equ 538
CDTMV3 .equ 540
CDTMV4 .equ 542
CDTMV5 .equ 544
VVBLKI .equ 546
VVBLKD .equ 548
CDTMA1 .equ 550
CDTMA2 .equ 552
CDTMF3 .equ 554
SRTIMR .equ 555
CDTMF4 .equ 556
INTEMP .equ 557
CDTMF5 .equ 558
SDMCTL .equ 559
SDLSTL .equ 560
SSKCTL .equ 562
XL_LCOUNT .equ 563
LPENH .equ 564
LPENV .equ 565
XL_RELADR .equ 568
CDEVIC .equ 570
CAUX1 .equ 572
CAUX2 .equ 573
TEMP .equ 574
ERRFLG .equ 575
DFLAGS .equ 576
DBSECT .equ 577
BOOTAD .equ 578
COLDST .equ 580
XL_RECLEN .equ 581
DSKTIM .equ 582
LINBUF .equ 583
XL_CHSALT .equ 619
XL_VSFLAG .equ 620
XL_KEYDIS .equ 621
XL_FINE .equ 622
GPRIOR .equ 623
GTIA .equ 623
PADDL0 .equ 624
STICK0 .equ 632
PTRIG0 .equ 636
STRIG0 .equ 644
CSTAT .equ 648
WMODE .equ 649
BLIM .equ 650
XL_NEWADR .equ 654
TXTROW .equ 656
TXTCOL .equ 657
TINDEX .equ 659
TXTMSC .equ 660
TXTOLD .equ 662
TMPX1 .equ 668
XL_CRETRY .equ 668
SUBTMP .equ 670
HOLD2 .equ 671
DMASK .equ 672
TMPLBT .equ 673
ESCFLG .equ 674
TABMAP .equ 675
LOGMAP .equ 690
INVFLG .equ 694
FILFLG .equ 695
TMPROW .equ 696
TMPCOL .equ 697
SCRFLG .equ 699
HOLD4 .equ 700
HOLD5 .equ 701
XL_DRETRY .equ 701
SHFLOC .equ 702
BOTSCR .equ 703
PCOLR0 .equ 704
PCOLR1 .equ 705
PCOLR2 .equ 706
PCOLR3 .equ 707
COLOR0 .equ 708
COLOR1 .equ 709
COLOR2 .equ 710
COLOR3 .equ 711
COLOR4 .equ 712
XL_RUNADR .equ 713
XL_HIUSED .equ 715
XL_ZHIUSE .equ 717
XL_GBYTEA .equ 719
XL_LOADAD .equ 721
XL_ZLOADA .equ 723
XL_DSCTLN .equ 725
XL_ACMISR .equ 727
XL_KRPDER .equ 729
XL_KEYREP .equ 730
XL_NOCLIK .equ 731
XL_HELPFG .equ 732
XL_DMASAV .equ 733
XL_PBPNT .equ 734
XL_PBUFSZ .equ 735
GLBABS .equ 736
RUNAD .equ 736
INITAD .equ 738
RAMSIZ .equ 740
MEMTOP .equ 741
MEMLO .equ 743
XL_HNDLOD .equ 745
DVSTAT .equ 746
CBAUDL .equ 750
CRSINH .equ 752
KEYDEL .equ 753
CH1 .equ 754
CHACT .equ 755
CHBAS .equ 756
XL_NEWROW .equ 757
XL_NEWCOL .equ 758
XL_ROWINC .equ 760
XL_COLINC .equ 761
CHAR .equ 762
ATACHR .equ 763
CH .equ 764
FILDAT .equ 764
DSPFLG .equ 766
SSFLAG .equ 767
DCB .equ 768
DDEVIC .equ 768
DUNIT .equ 769
DCOMND .equ 770
DSTATS .equ 771
DBUFLO .equ 772
DBUFHI .equ 773
DTIMLO .equ 774
DBYTLO .equ 776
DBYTHI .equ 777
DAUX1 .equ 778
DAUX2 .equ 779
TIMER1 .equ 780
ADDCOR .equ 782
XL_JMPERS .equ 782
CASFLG .equ 783
TIMER2 .equ 784
TEMP1 .equ 786
XL_TEMP2 .equ 787
TEMP2 .equ 788
XL_PTIMOT .equ 788
TEMP3 .equ 789
SAVIO .equ 790
TIMFLG .equ 791
STACKP .equ 792
TSTAT .equ 793
HATABS .equ 794
MAXDEV .equ 801
XL_PUPBT1 .equ 829
XL_PUPBT2 .equ 830
XL_PUPBT3 .equ 831
IOCB .equ 832
ICHID .equ 832
ICDNO .equ 833
ICCOM .equ 834
ICSTA .equ 835
ICBAL .equ 836
ICBAH .equ 837
ICPTL .equ 838
ICPTH .equ 839
ICBLL .equ 840
ICBLH .equ 841
ICAX1 .equ 842
ICAX2 .equ 843
ICAX3 .equ 844
ICAX4 .equ 845
ICAX5 .equ 846
ICAX6 .equ 847
PRNBUF .equ 960
XL_SUPERF .equ 1000
XL_CKEY .equ 1001
XL_CASSBT .equ 1002
XL_CARTCK .equ 1003
XL_ACMVAR .equ 1005
XL_MINTLK .equ 1017
XL_GINTLK .equ 1018
XL_CHLINK .equ 1019
CASBUF .equ 1021
USAREA .equ 1152
PAGE5 .equ 1280
LBPR1 .equ 1406
LBPR2 .equ 1534
LBUFF .equ 1408
PLYARG .equ 1504
FPSCR .equ 1510
FPSCR1 .equ 1516
FSCR .equ 1510
FSCR1 .equ 1516
LBFEND .equ 1535
PAGE6 .equ 1536
BOOTRG .equ 1792
RITCAR .equ 32768
LFTCAR .equ 40960
C0PAGE .equ 49152
C0PAGE .equ 49152
CHORG2 .equ 52224
HPOSP0 .equ 53248
M0PF .equ 53248
SIZEP0 .equ 53256
M0PL .equ 53256
SIZEM .equ 53260
GRAFP0 .equ 53261
GRAFM .equ 53265
COLPM0 .equ 53266
COLPF0 .equ 53270
PRIOR .equ 53275
GTIAR .equ 53275
VDELAY .equ 53276
GRACTL .equ 53277
HITCLR .equ 53278
CONSOL .equ 53279
AUDF1 .equ 53760
AUDC1 .equ 53761
AUDCTL .equ 53768
RANDOM .equ 53770
IRQEN .equ 53774
SKCTL .equ 53775
PORTA .equ 54016
PORTB .equ 54017
PACTL .equ 54018
PBCTL .equ 54019
DMACLT .equ 54272
DLISTL .equ 54274
HSCROL .equ 54276
VSCROL .equ 54277
CHBASE .equ 54281
WSYNC .equ 54282
VCOUNT .equ 54283
NMIEN .equ 54286
AFP .equ 55296
FASC .equ 55526
IFP .equ 55722
FPI .equ 55762
ZFR0 .equ 55876
ZF1 .equ 55878
FSUB .equ 55904
FADD .equ 55910
FMUL .equ 56027
FDIV .equ 56104
PLYEVL .equ 56640
FLD0R .equ 56713
FLD0P .equ 56717
FLD1R .equ 56728
FLD1P .equ 56732
FSTOR .equ 56743
FSTOP .equ 56747
FMOVE .equ 56758
EXP .equ 56768
EXP10 .equ 56780
LOG .equ 57037
LOG10 .equ 57041
CHORG .equ 57344
VECTBL .equ 58368
VCTABL .equ 58496
CIOORG .equ 58534
INTORG .equ 59093
SIOORG .equ 59716
DSKORT .equ 60906
PRNORG .equ 61048
CASORG .equ 61048
MONORG .equ 61667
KBDORG .equ 62436
EDITRV .equ 58368
SCRENV .equ 58384
KEYBDV .equ 58400
PRINTV .equ 58416
CASETV .equ 58432
DSKINV .equ 58451
CIOV .equ 58454
SIOV .equ 58457
SYSVBV .equ 58463
VBIVAL .equ 58464
XITVBV .equ 58466
VBIXVL .equ 58467
BLKBDV .equ 58481
WARMSV .equ 58484
COLDSV .equ 58487

View File

@ -0,0 +1,92 @@
CINT .equ 65409
IOINIT .equ 65412
RAMTAS .equ 65415
RESTOR .equ 65418
VECTOR .equ 65421
SETMSG .equ 65424
SECOND .equ 65427
TKSA .equ 65430
MEMTOP .equ 65433
MEMBOT .equ 65436
SCNKEY .equ 65439
SETTMO .equ 65442
ACPTR .equ 65445
CIOUT .equ 65448
UNTLK .equ 65451
UNLSN .equ 65454
LISTEN .equ 65457
TALK .equ 65460
READST .equ 65463
SETLFS .equ 65466
SETNAM .equ 65469
OPEN .equ 65472
CLOSE .equ 65475
CHKIN .equ 65478
CHKOUT .equ 65481
CLRCHN .equ 65484
CHRIN .equ 65487
CHROUT .equ 65490
LOAD .equ 65493
SAVE .equ 65496
SETTIM .equ 65499
RDTIME .equ 65502
STOP .equ 65505
GETIN .equ 65508
CLALL .equ 65511
UDTIME .equ 65514
SCREEN .equ 65517
PLOT .equ 65520
IOBASE .equ 65523
IERRORLO .equ 768
IERRORHI .equ 769
IMAINLO .equ 770
IMAINHI .equ 771
ICRNCHLO .equ 772
ICRNCHHI .equ 773
IQPLOPLO .equ 774
IQPLOPHI .equ 775
IGONELO .equ 776
IGONEHI .equ 777
IEVALLO .equ 778
IEVALHI .equ 779
SAREG .equ 780
SXREG .equ 781
SYREG .equ 782
SPREG .equ 783
USRPOK .equ 784
USRADDLO .equ 785
USRADDHI .equ 786
CINVLO .equ 788
CINVHI .equ 789
CBINVLO .equ 790
CBINVHI .equ 791
NMINVLO .equ 792
NMINVHI .equ 793
IOPENLO .equ 794
IOPENHI .equ 795
ICLOSELO .equ 796
ICLOSEHI .equ 797
ICKINLO .equ 798
ICKINHI .equ 799
ICKOUTLO .equ 800
ICKOUTHI .equ 801
ICLRCHLO .equ 802
ICLRCHHI .equ 803
IBASINLO .equ 804
IBASINHI .equ 805
IBSOUTLO .equ 806
IBSOUTHI .equ 807
ISTOPLO .equ 808
ISTOPHI .equ 809
IGETINLO .equ 810
IGETINHI .equ 811
ICLALLLO .equ 812
ICLALLHI .equ 813
USRCMDLO .equ 814
USRCMDHI .equ 815
ILOADLO .equ 816
ILOADHI .equ 817
ISAVELO .equ 818
ISAVEHI .equ 819
TBUFFER .equ 828
VICSCN .equ 1024

View File

@ -0,0 +1,12 @@
diff -Naur dis6502-0.12/lex.l dis6502-0.12.patched/lex.l
--- dis6502-0.12/lex.l 2004-01-17 18:25:28.000000000 -0500
+++ dis6502-0.12.patched/lex.l 2017-09-08 00:44:16.631761979 -0400
@@ -91,7 +91,7 @@
emalloc(n)
unsigned n;
{
- char *ptr, *malloc();
+ char *ptr;
if ((ptr = malloc(n)) == (char *) 0) {
(void) fprintf(stderr,"out of core");

View File

@ -0,0 +1,176 @@
.\" Man page generated from reStructuredText.
.
.TH DIS6502 1 "2017-09-08" "0.12" "SlackBuilds.org"
.SH NAME
dis6502 \- Disassemble 6502 object code
.
.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
..
.\" RST source for dis6502(1) man page. Convert with:
.
.\" rst2man.py dis6502.rst > dis6502.1
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.SH SYNOPSIS
.sp
dis6502 [\fI\-b\fP | \fI\-l\fP | \fI\-c\fP | \fI\-r <address>\fP] [\fI\-a\fP] [\fI\-p <pfile>\fP] [\fI\-v <address>\fP] [\fI\-7\fP] \fIfile\fP
.SH DESCRIPTION
.sp
Dis6502 disassembles 6502 binary files. Binary formats understood include
Atari binary files (L menu command) and boot files. Equate and control
files can be included via the option to name well known locations and to
control the disassembly process. The output includes a cross reference.
.sp
The disassembly process is a two pass operation: First the program flow
is traced starting with the init and run parameters in the file headers.
The dump routine then prints out the information.
.SH OPTIONS
.INDENT 0.0
.TP
.B \fB\-r\fP \fI<address\fP>
\fIfile\fP is raw binary, located at \fI<address>\fP\&.
.TP
.B \fB\-b\fP
\fIfile\fP is an Atari boot image (disk or cassette). Note that neither .ATR
nor .CAS images are supported: the file must be a raw image with no header
information. For disks, this is called an XFD file.
.TP
.B \fB\-l\fP
\fIfile\fP is an Atari load file (aka XEX).
.TP
.B \fB\-c\fP
\fIfile\fP is a Commodore 64 executable.
.TP
.B \fB\-a\fP
Generate assembly output. Suppresses the addresses and object
code normally printed on each line of output, and omits the
cross\-reference section from the end of the output.
.TP
.B \fB\-p\fP \fI<pfile>\fP
Use predefinition file. See \fBFILE FORMAT\fP for the predef file format.
Up to 10 \fB\-p\fP options may be included.
.TP
.B \fB\-v\fP \fI<address>\fP
Alternate vector address (normally \fB$FFFA\fP). This option only has
any effect with raw binaries (\fB\-r\fP option).
.TP
.B \fB\-7\fP
Mask character data to 7\-bit.
.UNINDENT
.SH FILES
.sp
\fB/usr/share/dis6502/atari8.predef\fP
.sp
\fB/usr/share/dis6502/c64.predef\fP
.sp
Predefinition files for Atari 8\-bit and Commodore 64, containing the usual
system equates.
.SH FILE FORMAT
.sp
Lines in a predefinition file consist of:
.sp
\fBlabel\fP .eq \fIaddress\fP
.sp
\fBlabel\fP .equ \fIaddress\fP
.INDENT 0.0
.INDENT 3.5
Defines a label. The \fB\&.eq\fP and \fB\&.equ\fP forms are equivalent.
.UNINDENT
.UNINDENT
.sp
\fB\&.jtab2\fP \fIlowaddr,hiaddr,count\fP
.INDENT 0.0
.INDENT 3.5
Defines a table of \fIcount\fP pointers, split into low and
high byte tables. In assembly code, such a table might look like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
; func1, func2, func3 are addresses.
table_lo: .byte <func1, <func2, <func3
table_hi: .byte >func1, >func2, >func3
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To disassemble these, assuming the address of \fItable_lo\fP is \fB$1000\fP,
use:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
\&.jtab2 $1000,$1003,3
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fB\&.rtstab\fP \fIlowaddr\fP,*hiaddr*,*count*
.INDENT 0.0
.INDENT 3.5
Like \fB\&.jtab2\fP, but each entry contains the target address minus one, for use with RTS.
.UNINDENT
.UNINDENT
.sp
\fB\&.trace\fP \fIaddress\fP
.INDENT 0.0
.INDENT 3.5
Causes the trace process to continue at \fIaddress\fP\&.
.UNINDENT
.UNINDENT
.sp
\fB\&.stop\fP \fIaddress\fP
.INDENT 0.0
.INDENT 3.5
Causes the trace process to stop at \fIaddress\fP\&.
.UNINDENT
.UNINDENT
.SH COPYRIGHT
.sp
dis6502 is distributed under the terms of the Free Software Foundation\(aqs
General Public License, Version 2. See the file
/usr/doc/dis6502\-0.12/COPYING for license information.
.SH AUTHORS
.sp
dis6502 was written by Robert Bond, Udi Finkelstein, and Eric Smith.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
dis(1), da65(1)
.sp
The dis6502 homepage: \fI\%http://www.brouhaha.com/~eric/software/dis6502/\fP
.\" Generated by docutils manpage writer.
.

View File

@ -0,0 +1,78 @@
#!/bin/sh
# Slackware build script for dis6502
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=dis6502
VERSION=${VERSION:-0.12}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod 644 *
patch -p1 < $CWD/compilefix.diff
patch -p1 < $CWD/helpformat.diff # add missing \n to last line of usage msg
make CFLAGS="$SLKCFLAGS"
mkdir -p $PKG/usr/bin $PKG/usr/man/man1
install -s -m0755 $PRGNAM $PKG/usr/bin
# man page based on the one from comp.sources.amiga v02i053 release, dated
# October 1986,
gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
# c64.predefs file is a modified version of the one from the
# comp.sources.amiga v02i053 release. atari8.predefs file was created
# by the SlackBuild author.
mkdir -p $PKG/usr/share/$PRGNAM
cat $CWD/c64.predefs > $PKG/usr/share/$PRGNAM/c64.predefs
cat $CWD/atari8.predefs > $PKG/usr/share/$PRGNAM/atari8.predefs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README* COPYING $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View File

@ -0,0 +1,10 @@
PRGNAM="dis6502"
VERSION="0.12"
HOMEPAGE="http://www.brouhaha.com/~eric/software/dis6502/"
DOWNLOAD="http://www.brouhaha.com/~eric/software/dis6502/dis6502-0.12.tar.gz"
MD5SUM="6b865314f1d7d8629fd3c7f7e390b099"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

View File

@ -0,0 +1,138 @@
.. RST source for dis6502(1) man page. Convert with:
.. rst2man.py dis6502.rst > dis6502.1
.. rst2man.py comes from the SBo development/docutils package.
.. |version| replace:: 0.12
.. |date| date::
=======
dis6502
=======
----------------------------
Disassemble 6502 object code
----------------------------
:Manual section: 1
:Manual group: SlackBuilds.org
:Date: |date|
:Version: |version|
SYNOPSIS
========
dis6502 [*-b* | *-l* | *-c* | *-r <address>*] [*-a*] [*-p <pfile>*] [*-v <address>*] [*-7*] *file*
DESCRIPTION
===========
Dis6502 disassembles 6502 binary files. Binary formats understood include
Atari binary files (L menu command) and boot files. Equate and control
files can be included via the option to name well known locations and to
control the disassembly process. The output includes a cross reference.
The disassembly process is a two pass operation: First the program flow
is traced starting with the init and run parameters in the file headers.
The dump routine then prints out the information.
OPTIONS
=======
**-r** *<address*>
*file* is raw binary, located at *<address>*.
**-b**
*file* is an Atari boot image (disk or cassette). Note that neither .ATR
nor .CAS images are supported: the file must be a raw image with no header
information. For disks, this is called an XFD file.
**-l**
*file* is an Atari load file (aka XEX).
**-c**
*file* is a Commodore 64 executable.
**-a**
Generate assembly output. Suppresses the addresses and object
code normally printed on each line of output, and omits the
cross-reference section from the end of the output.
**-p** *<pfile>*
Use predefinition file. See **FILE FORMAT** for the predef file format.
Up to 10 **-p** options may be included.
**-v** *<address>*
Alternate vector address (normally **$FFFA**). This option only has
any effect with raw binaries (**-r** option).
**-7**
Mask character data to 7-bit.
FILES
=====
**/usr/share/dis6502/atari8.predef**
**/usr/share/dis6502/c64.predef**
Predefinition files for Atari 8-bit and Commodore 64, containing the usual
system equates.
FILE FORMAT
===========
Lines in a predefinition file consist of:
**label** .eq *address*
**label** .equ *address*
Defines a label. The **.eq** and **.equ** forms are equivalent.
**.jtab2** *lowaddr,hiaddr,count*
Defines a table of *count* pointers, split into low and
high byte tables. In assembly code, such a table might look like::
; func1, func2, func3 are addresses.
table_lo: .byte <func1, <func2, <func3
table_hi: .byte >func1, >func2, >func3
To disassemble these, assuming the address of *table_lo* is **$1000**,
use::
.jtab2 $1000,$1003,3
**.rtstab** *lowaddr*\,*hiaddr*\,*count*
Like **.jtab2**, but each entry contains the target address minus one, for use with RTS.
**.trace** *address*
Causes the trace process to continue at *address*.
**.stop** *address*
Causes the trace process to stop at *address*.
COPYRIGHT
=========
dis6502 is distributed under the terms of the Free Software Foundation's
General Public License, Version 2. See the file
/usr/doc/dis6502-|version|/COPYING for license information.
AUTHORS
=======
dis6502 was written by Robert Bond, Udi Finkelstein, and Eric Smith.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SEE ALSO
========
dis(1), da65(1)
The dis6502 homepage: http://www.brouhaha.com/~eric/software/dis6502/

View File

@ -0,0 +1,12 @@
diff -Naur dis6502-0.12.orig/initopts.c dis6502-0.12/initopts.c
--- dis6502-0.12.orig/initopts.c 2004-01-17 18:25:29.000000000 -0500
+++ dis6502-0.12/initopts.c 2006-11-24 18:56:32.000000000 -0500
@@ -30,7 +30,7 @@
" options: -a assembly output\n"
" -p <file> predefs\n"
" -v <address> alternate vector address\n"
- " -7 mask character data to 7-bit",
+ " -7 mask character data to 7-bit\n",
progname);
exit (1);
}

View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
dis6502: dis6502 (flow-tracing disassembler for 6502)
dis6502:
dis6502: dis6502 is a 6502 disassembler that supports Atari 8-bit and Commodore
dis6502: executables, as well as raw memory dumps. It attempts to separate code
dis6502: sections from data by tracing the flow of execution, and supports a
dis6502: config file for manually defining code sections that aren't reached
dis6502: by the trace.
dis6502:
dis6502:
dis6502:
dis6502: