diff options
author | B. Watson <urchlay@slackware.uk> | 2023-05-16 01:59:00 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-20 11:17:50 +0700 |
commit | 43bb3639992b3127dc572f06cd1a6ce5c036d944 (patch) | |
tree | 385fbb6988a610dc3be0aac3e93cac20f36fc477 | |
parent | ae3369a8279580b04d31b0654d1afeb2f461bf26 (diff) |
development/dis6502: Updated for version 0.15+2857fc3_20180311.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | development/dis6502/2857fc3_20180311.diff | 446 | ||||
-rw-r--r-- | development/dis6502/README | 3 | ||||
-rw-r--r-- | development/dis6502/compilefix.diff | 12 | ||||
-rw-r--r-- | development/dis6502/dis6502.1 | 176 | ||||
-rw-r--r-- | development/dis6502/dis6502.SlackBuild | 36 | ||||
-rw-r--r-- | development/dis6502/dis6502.info | 8 | ||||
-rw-r--r-- | development/dis6502/helpformat.diff | 12 | ||||
-rw-r--r-- | development/dis6502/manpage.diff | 121 |
8 files changed, 600 insertions, 214 deletions
diff --git a/development/dis6502/2857fc3_20180311.diff b/development/dis6502/2857fc3_20180311.diff new file mode 100644 index 000000000000..7101c7a22f81 --- /dev/null +++ b/development/dis6502/2857fc3_20180311.diff @@ -0,0 +1,446 @@ +diff --git a/dis.h b/dis.h +index 607678d..c48a6c2 100644 +--- a/dis.h ++++ b/dis.h +@@ -1,8 +1,7 @@ + /* + * dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith + * +- * $Id: dis.h 26 2004-01-17 23:28:23Z eric $ +- * Copyright 2000-2016 Eric Smith <spacewar@gmail.com> ++ * Copyright 2000-2018 Eric Smith <spacewar@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as +@@ -21,7 +20,7 @@ + */ + + +-extern int sevenbit; /* if true, mask character data with 0x7f ++extern bool sevenbit; /* if true, mask character data with 0x7f + to ignore MSB */ + + typedef uint16_t addr_t; +@@ -41,6 +40,10 @@ extern int base_address, vector_address; + extern int entry_count; + extern int entry_address[MAX_ENTRY]; + ++ ++extern bool prodos; ++ ++ + extern int asmout; + extern unsigned char f[]; + extern unsigned char d[]; +@@ -116,8 +119,9 @@ char *get_name(addr_t loc); + #define TSTOP 262 + #define TRTSTAB 263 + #define TJTAB2 264 +-#define EQS 265 +-#define OFS 266 ++#define TJTAB 265 ++#define EQS 266 ++#define OFS 267 + + extern FILE *yyin, *yyout; + int lineno; +diff --git a/initopts.c b/initopts.c +index f33345c..f5bb146 100644 +--- a/initopts.c ++++ b/initopts.c +@@ -1,10 +1,8 @@ + /* +- * +- * dis [-p predefineds] file +- * +- * The -p option may be repeated. ++ * Copyright 2001-2018 Eric Smith <spacewar@gmail.com> + */ + ++#include <stdbool.h> + #include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +@@ -37,7 +35,8 @@ void usage (void) + " -p <file> predefs\n" + " -e <address> alternate entry point address\n" + " -v <address> alternate vector address\n" +- " -7 mask character data to 7-bit", ++ " -7 mask character data to 7-bit\n" ++ " -P decode ProDOS MLI calls\n", + progname); + exit (1); + } +@@ -96,7 +95,10 @@ void initopts (int argc, char *argv[]) + bopt = ATARI_BOOT; + break; + case '7': +- sevenbit = 1; ++ sevenbit = true; ++ break; ++ case 'P': ++ prodos = true; + break; + default: crash("Invalid option letter"); + } +diff --git a/lex.l b/lex.l +index 1899887..3c637c6 100644 +--- a/lex.l ++++ b/lex.l +@@ -1,8 +1,7 @@ + /* + * dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith + * +- * $Id: lex.l 26 2004-01-17 23:28:23Z eric $ +- * Copyright 2001-2014 Eric Smith <eric@brouhaha.com> ++ * Copyright 2001-2018 Eric Smith <spacewar@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as +@@ -23,6 +22,7 @@ + + %{ + #undef ECHO ++#include <stdbool.h> + #include <stdint.h> + #include <stdlib.h> + #include <string.h> +@@ -62,6 +62,8 @@ alphanum [0-9a-zA-Z_] + + \.[Jj][Tt][Aa][Bb]2 { return TJTAB2; } + ++\.[Jj][Tt][Aa][Bb] { return TJTAB; } ++ + {digit}+ { + (void)sscanf(yytext, "%d", &token.ival); + return NUMBER; +diff --git a/main.c b/main.c +index cdc3c23..a6f101d 100644 +--- a/main.c ++++ b/main.c +@@ -1,8 +1,7 @@ + /* + * dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith + * +- * $Id: main.c 26 2004-01-17 23:28:23Z eric $ +- * Copyright 2000-2016 Eric Smith <eric@brouhaha.com> ++ * Copyright 2000-2018 Eric Smith <spacewar@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as +@@ -21,6 +20,7 @@ + */ + + ++#include <stdbool.h> + #include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +@@ -28,7 +28,8 @@ + + #include "dis.h" + +-int sevenbit = 0; /* if true, mask character data with 0x7f to ignore MSB */ ++bool sevenbit = false; /* if true, mask character data with 0x7f to ignore MSB */ ++bool prodos = false; + + #define NTSTART 500 + +@@ -44,6 +45,12 @@ int rtstab_addr [RTSTAB_MAX]; /* .rtstab directive */ + int rtstab_size [RTSTAB_MAX]; + int rtstab_count = 0; + ++#define JTAB_MAX 50 ++ ++int jtab_addr [JTAB_MAX]; /* .jtab directive */ ++int jtab_size [JTAB_MAX]; ++int jtab_count = 0; ++ + #define JTAB2_MAX 50 + + int jtab2_addr_low [JTAB2_MAX]; /* .jtab2 directive */ +@@ -122,6 +129,18 @@ void trace_inst (addr_t addr) + break; + } + ++ // handle ProDOS MLI calls ++ if (prodos && (opcode == 0x20) && (operand == 0xbf00)) ++ { ++ f[addr++] |= TDONE; // system call number ++ uint16_t parameter_list = getword(addr); ++ f[addr++] |= TDONE; ++ f[addr++] |= TDONE; ++ f[parameter_list] |= DREF; ++ save_ref(istart, operand); ++ continue; ++ } ++ + /* Mark data references */ + + switch (ip->flag & ADRMASK) +@@ -211,8 +230,7 @@ void start_trace (addr_t loc, char *name) + + void do_ptrace (void) + { +- int i; +- for (i = 0; i<tstarti; i++) ++ for (int i = 0; i<tstarti; i++) + { + char *trace_sym = (char *) malloc (6); + sprintf (trace_sym, "P%04x", tstart [i]); +@@ -223,16 +241,29 @@ void do_ptrace (void) + + void do_rtstab (void) + { +- int i, j; +- int loc, code; ++ for (int i = 0; i < rtstab_count; i++) ++ { ++ int loc = rtstab_addr [i]; ++ for (int j = 0; j < rtstab_size [i]; j++) ++ { ++ char *trace_sym = (char *) malloc (6); ++ int code = d [loc] + (d [loc + 1] << 8) + 1; ++ sprintf (trace_sym, "T%04x", code); ++ start_trace (code, trace_sym); ++ loc += 2; ++ } ++ } ++} + +- for (i = 0; i < rtstab_count; i++) ++void do_jtab (void) ++{ ++ for (int i = 0; i < jtab_count; i++) + { +- loc = rtstab_addr [i]; +- for (j = 0; j < rtstab_size [i]; j++) ++ int loc = jtab_addr [i]; ++ for (int j = 0; j < jtab_size [i]; j++) + { + char *trace_sym = (char *) malloc (6); +- code = d [loc] + (d [loc + 1] << 8) + 1; ++ int code = d [loc] + (d [loc + 1] << 8); + sprintf (trace_sym, "T%04x", code); + start_trace (code, trace_sym); + loc += 2; +@@ -242,16 +273,14 @@ void do_rtstab (void) + + void do_jtab2 (void) + { +- int i, j; +- int loc_l, loc_h, code; +- for (i = 0; i < jtab2_count; i++) ++ for (int i = 0; i < jtab2_count; i++) + { +- loc_l = jtab2_addr_low [i]; +- loc_h = jtab2_addr_high [i]; +- for (j = 0; j < jtab2_size [i]; j++) ++ int loc_l = jtab2_addr_low [i]; ++ int loc_h = jtab2_addr_high [i]; ++ for (int j = 0; j < jtab2_size [i]; j++) + { + char *trace_sym = (char *) malloc (6); +- code = d [loc_l + j] + (d [loc_h + j] << 8); ++ int code = d [loc_l + j] + (d [loc_h + j] << 8); + sprintf (trace_sym, "T%04x", code); + start_trace (code, trace_sym); + } +@@ -295,6 +324,7 @@ int main (int argc, char *argv[]) + + do_ptrace (); + do_rtstab (); ++ do_jtab (); + do_jtab2 (); + + trace_all (); +@@ -308,7 +338,6 @@ int main (int argc, char *argv[]) + void get_predef (void) + { + long loc, loc2; +- int i; + int size; + char *name; + +@@ -334,6 +363,20 @@ void get_predef (void) + rtstab_addr [rtstab_count] = loc; + rtstab_size [rtstab_count++] = size; + break; ++ case TJTAB: ++ if (yylex() != NUMBER) ++ crash(".jtab needs an address operand"); ++ loc = token.ival; ++ if (loc > 0x10000 || loc < 0) ++ crash("Number out of range"); ++ if (yylex() != ',') ++ crash(".jtab needs a comma"); ++ if (yylex() != NUMBER) ++ crash(".jtab needs a comma"); ++ size = token.ival; ++ jtab_addr [jtab_count] = loc; ++ jtab_size [jtab_count++] = size; ++ break; + case TJTAB2: + if (yylex() != NUMBER) + crash(".jtab2 needs a number operand"); +@@ -401,7 +444,7 @@ void get_predef (void) + size = token.ival; + f[loc] |= NAMED; + save_name(loc, name); +- for (i = 1; i < size; i++) ++ for (int i = 1; i < size; i++) + { + f [loc + i] |= OFFSET; + offset [loc + i] = -i; +@@ -449,7 +492,6 @@ void loadboot (void) + + FILE *fp; + int base_addr; +- register int i; + int len; + + fp = fopen(file, "r"); +@@ -469,7 +511,7 @@ void loadboot (void) + if (fread((char *)&d[base_addr], 1, len, fp) != len) + crash("input too short"); + +- for(i = base_addr; len > 0; len--) ++ for(int i = base_addr; len > 0; len--) + f[i++] |= LOADED; + + start_trace(base_addr+6, "**BOOT**"); +@@ -481,7 +523,7 @@ void loadfile (void) + FILE *fp; + int base_addr; + int last_addr; +- register int i; ++ int i; + int had_header; + int tmp; + +@@ -603,13 +645,12 @@ void binaryloadfile (void) + + if (entry_count) + { +- int i; +- char label [8]; +- for (i = 0; i < entry_count; i++) ++ for (int j = 0; j < entry_count; j++) + { +- snprintf (label, sizeof (label), "e_%04x", entry_address[i]); ++ char *label = malloc(7); ++ sprintf (label, "e_%04x", entry_address[j]); + printf("label: %s\n", label); +- start_trace (entry_address[i], label); ++ start_trace (entry_address[j], label); + } + } + else +diff --git a/print.c b/print.c +index a049a91..1a3f25c 100644 +--- a/print.c ++++ b/print.c +@@ -1,8 +1,7 @@ + /* + * dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith + * +- * $Id: print.c 26 2004-01-17 23:28:23Z eric $ +- * Copyright 2000-2014 Eric Smith <eric@brouhaha.com> ++ * Copyright 2000-2018 Eric Smith <spacewar@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as +@@ -20,7 +19,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA + */ + +- ++#include <stdbool.h> + #include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +@@ -247,7 +246,7 @@ int print_data (addr_t i) + i++; + + for (j = 1; j < 8; j++) { +- if (f[i] & (JREF | SREF | DREF) || ((f[i] & LOADED) == 0)) ++ if (f[i] & (JREF | SREF | DREF | ISOP) || ((f[i] & LOADED) == 0)) + break; + else + printf(",$%02x", getbyte(i)); +diff --git a/ref.c b/ref.c +index 879ddb1..5a40156 100644 +--- a/ref.c ++++ b/ref.c +@@ -1,8 +1,7 @@ + /* + * dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith + * +- * $Id: ref.c,v 1.5 2003/09/15 21:49:25 eric Exp $ +- * Copyright 2001-2003 Eric Smith <eric@brouhaha.com> ++ * Copyright 2001-2018 Eric Smith <spacewar@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as +@@ -21,6 +20,7 @@ + */ + + ++#include <stdbool.h> + #include <stdint.h> + #include <stdio.h> + +diff --git a/tbl.c b/tbl.c +index 8a5f3b4..c42f56e 100644 +--- a/tbl.c ++++ b/tbl.c +@@ -1,8 +1,7 @@ + /* + * dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith + * +- * $Id: tbl.c 26 2004-01-17 23:28:23Z eric $ +- * Copyright 2001-2014 Eric Smith <eric@brouhaha.com> ++ * Copyright 2001-2018 Eric Smith <spacewar@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as +@@ -20,7 +19,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA + */ + +- ++#include <stdbool.h> + #include <stdint.h> + #include <stdio.h> + +@@ -83,6 +82,7 @@ struct info optbl[256] = { + [0x41] = { "eor", 2, INX }, + + [0x45] = { "eor", 2, ZPG }, ++ [0x46] = { "lsr", 2, ZPG }, + + [0x48] = { "pha", 1, IMP }, + [0x49] = { "eor", 2, IMM }, +diff --git a/trace_queue.c b/trace_queue.c +index 332473c..dc8852f 100644 +--- a/trace_queue.c ++++ b/trace_queue.c +@@ -1,8 +1,7 @@ + /* + * dis6502 by Robert Bond, Udi Finkelstein, and Eric Smith + * +- * $Id: trace_queue.c,v 1.2 2003/09/15 21:49:25 eric Exp $ +- * Copyright 2000-2003 Eric Smith <eric@brouhaha.com> ++ * Copyright 2000-2018 Eric Smith <spacewar@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as +@@ -20,7 +19,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA + */ + +- ++#include <stdbool.h> + #include <stdint.h> + #include <stdio.h> + #include "dis.h" diff --git a/development/dis6502/README b/development/dis6502/README index 5e3fd019706b..f125d60a0985 100644 --- a/development/dis6502/README +++ b/development/dis6502/README @@ -6,6 +6,9 @@ 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: the package includes predef files for Atari and Commodore 8-bit +computers, for use with the -p option, in /usr/share/dis6502. + 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). diff --git a/development/dis6502/compilefix.diff b/development/dis6502/compilefix.diff deleted file mode 100644 index 00a76e9d6534..000000000000 --- a/development/dis6502/compilefix.diff +++ /dev/null @@ -1,12 +0,0 @@ -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"); diff --git a/development/dis6502/dis6502.1 b/development/dis6502/dis6502.1 deleted file mode 100644 index 458f8fd3835e..000000000000 --- a/development/dis6502/dis6502.1 +++ /dev/null @@ -1,176 +0,0 @@ -.\" 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. -. diff --git a/development/dis6502/dis6502.SlackBuild b/development/dis6502/dis6502.SlackBuild index efe451bb9d0e..12f7c066223f 100644 --- a/development/dis6502/dis6502.SlackBuild +++ b/development/dis6502/dis6502.SlackBuild @@ -6,10 +6,20 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20230516 bkw: *finally* updated after almost 6 years. upstream moved +# to github but didn't update or remove the old website... +# - updated for latest git (0.15+2857fc3_20180311). used latest git +# rather than the last release because there's a critical bugfix: +# release was missing the LSR zeropage opcode. +# - use upstream's man page, now that there is one. though I had to +# patch it to add a couple options that aren't mentioned there. +# - get rid of no-longer-needed compilefix and helpformat patches. +# - mention the predefs files in README. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=dis6502 -VERSION=${VERSION:-0.12} +VERSION=${VERSION:-0.15+2857fc3_20180311} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -47,25 +57,31 @@ fi set -e +TARVER="$( echo $VERSION | cut -d+ -f1 )" +GITVER="$( echo $VERSION | cut -d+ -f2 )" + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$TARVER +tar xvf $CWD/$PRGNAM-$TARVER.tar.gz +cd $PRGNAM-$TARVER 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 +# Patch was made by editing the man page. Documents a few options +# that are in the help output, cleans up the formatting, and fixes +# the synopsis. +patch -p1 < $CWD/manpage.diff + +# Patch was made by cloning upstream's repo and doing a 'git diff v0.15'. +patch -p1 < $CWD/$GITVER.diff + make CFLAGS="$SLKCFLAGS -fcommon" 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 +gzip -9c < $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 diff --git a/development/dis6502/dis6502.info b/development/dis6502/dis6502.info index 553ce9fb1cee..65a483acbda5 100644 --- a/development/dis6502/dis6502.info +++ b/development/dis6502/dis6502.info @@ -1,8 +1,8 @@ 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" +VERSION="0.15+2857fc3_20180311" +HOMEPAGE="https://github.com/brouhaha/dis6502/" +DOWNLOAD="https://github.com/brouhaha/dis6502/archive/v0.15/dis6502-0.15.tar.gz" +MD5SUM="0db176cea87d7e01ca1112a62a23b9d9" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/dis6502/helpformat.diff b/development/dis6502/helpformat.diff deleted file mode 100644 index bda1ffcecdf6..000000000000 --- a/development/dis6502/helpformat.diff +++ /dev/null @@ -1,12 +0,0 @@ -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); - } diff --git a/development/dis6502/manpage.diff b/development/dis6502/manpage.diff new file mode 100644 index 000000000000..0004c82a5baa --- /dev/null +++ b/development/dis6502/manpage.diff @@ -0,0 +1,121 @@ +diff --git a/dis6502.1 b/dis6502.1 +index 5234264..a0d9ea3 100644 +--- a/dis6502.1 ++++ b/dis6502.1 +@@ -1,14 +1,34 @@ +-.TH DIS6502 1 "12 SEP 2003" +-.UC 4 ++.TH DIS6502 1 "16 MAY 2023" "0.15+2857fc3_20180311" "SlackBuilds.org" + .SH NAME + dis6502 \- Disassemble 6502 object code + .SH SYNOPSIS + .I dis6502 + [ +-.I \-b ++.B \-r \fIaddress\fP ++| ++.B \-b ++| ++.B \-l ++| ++.B \-c + ] + [ +-.I -p \fIpfile\fP ++.B \-a ++] ++[ ++.B \-p \fIpfile\fP ++] ++[ ++.B \-e \fIaddress\fP ++] ++[ ++.B \-v \fIaddress\fP ++] ++[ ++.B \-7 ++] ++[ ++.B \-P + ] + .I file + .LP +@@ -24,41 +44,49 @@ 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. +-.PP +-The command line options are: ++.SH OPTIONS + .TP +-.I \-r \fIaddress\fP ++.B \-r \fIaddress\fP + Raw binary input file, with the first byte of the file being associated with + the specified address. + .TP +-.I \-b ++.B \-b + Atari boot format input file. + .TP +-.I \-l ++.B \-l + Atari load format input file. + .TP +-.I \-c ++.B \-c + Commodore format input file. + .TP +-.I \-p \fIpfile\fP ++.B \-a ++Assembly output. ++.TP ++.B \-p \fIpfile\fP + Read in the predefine file \fIpfile\fP. + Up to 20 \fI-p\fP options may be included. + .TP +-.I \-v \fIaddress\fP ++.B \-e \fIaddress\fP ++Use an alternate entry point address. ++.TP ++.B \-v \fIaddress\fP + Use an alternate address for the reset and interrupt vectors. + .TP +-.I \-7 ++.B \-7 + Mask off MSB of character data. +-.PP +-Lines in pfile consist of: ++.TP ++.B \-P ++Decode Apple ProDOS MLI calls. ++.SH PREDEFINE FILES ++Lines in \fIpfile\fP consist of: + .PP + name .eq address + .PP + .stop address + .PP + .trace address +-.PP +-.I Address ++.PP ++.I Address + may be a decimal number or + may be a hexadecimal number (the first character of the number + should be "$"). For example, "$21b5" is +@@ -66,12 +94,11 @@ the hexadecimal number 21b5. + .I Name + is a sequence of numbers and characters starting with a + letter. +-.I .trace ++.I .trace + causes +-the trace process to continue at the address given. ++the trace process to continue at the address given. + .I .stop + causes the + trace process to stop at the address given. + .SH AUTHORS + Robert Bond, Udi Finkelstein, and Eric Smith +-.SH BUGS |