[z80dasm] Initial import (#798074).
Eric Smith
brouhaha at fedoraproject.org
Mon Mar 19 17:52:32 UTC 2012
commit d0b057d6cab78ce895fa567a80939e53b60e01a0
Author: Eric Smith <eric at brouhaha.com>
Date: Mon Mar 19 10:53:18 2012 -0700
Initial import (#798074).
.gitignore | 1 +
sources | 1 +
z80dasm-1.1.2-16-bit-addr.patch | 33 +++++++++++++++++++++++++++
z80dasm.spec | 47 +++++++++++++++++++++++++++++++++++++++
4 files changed, 82 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b2f5eea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/z80dasm-1.1.2.tar.gz
diff --git a/sources b/sources
index e69de29..62722f3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d082915a086564de0a1acc8715897ec1 z80dasm-1.1.2.tar.gz
diff --git a/z80dasm-1.1.2-16-bit-addr.patch b/z80dasm-1.1.2-16-bit-addr.patch
new file mode 100644
index 0000000..8b6eed0
--- /dev/null
+++ b/z80dasm-1.1.2-16-bit-addr.patch
@@ -0,0 +1,33 @@
+diff -up z80dasm-1.1.2/src/dz80.c.16-bit-addr z80dasm-1.1.2/src/dz80.c
+--- z80dasm-1.1.2/src/dz80.c.16-bit-addr 2012-02-27 16:22:45.752821420 -0800
++++ z80dasm-1.1.2/src/dz80.c 2012-02-27 16:28:02.023832401 -0800
+@@ -92,7 +92,7 @@ int ckrange(int skip, char *str)
+ /* not enough data in file */
+ return -1;
+ }
+- val=t[skip+0]+256*t[skip+1];
++ val=(t[skip+0]+256*t[skip+1]) & 0xffff;
+
+ if(pass==1 || pass==2 || (!a_labels)) {
+ /* on first two passes don't bother printing labels (or if
+@@ -149,7 +149,7 @@ int ckrange_rel(int skip, int pc, char *
+ } else {
+ val=pc+2+t[skip]-256;
+ }
+-
++ val &= 0xffff;
+ symb=symbol_find(val);
+ }
+
+diff -up z80dasm-1.1.2/src/table.c.16-bit-addr z80dasm-1.1.2/src/table.c
+--- z80dasm-1.1.2/src/table.c.16-bit-addr 2012-02-27 16:22:35.847821076 -0800
++++ z80dasm-1.1.2/src/table.c 2012-02-27 16:23:13.163822371 -0800
+@@ -123,7 +123,7 @@ else if(ia[0]==0x10)
+ if(argtyp==undef) {
+ return 1;
+ } else {
+- symbol_newref(argval,prc,argtyp);
++ symbol_newref(argval & 0xffff,prc,argtyp);
+ }
+
+ return(1);/*ok*/
diff --git a/z80dasm.spec b/z80dasm.spec
new file mode 100644
index 0000000..445d921
--- /dev/null
+++ b/z80dasm.spec
@@ -0,0 +1,47 @@
+Name: z80dasm
+Version: 1.1.2
+Release: 1%{?dist}
+Summary: Z80 Disassembler
+Group: Development/Languages
+License: GPLv2+
+URL: http://www.tablix.org/~avian/blog/articles/%{name}/
+Source0: http://www.tablix.org/~avian/%{name}/%{name}-%{version}.tar.gz
+
+# Target addresses are 16 bits, but relative address computations were not
+# being masked to 16 bits, causing bad results on all systems and buffer
+# overruns in sprintf on 64-bit systems. Reported to upstream via email
+# on 27-Feb-2012.
+Patch0: z80dasm-1.1.2-16-bit-addr.patch
+
+BuildRequires: z80asm
+
+%description
+z80dasm is a disassembler for the Zilog Z80 microprocessor and
+compatibles. It can be used to reverse engineer programs and operating
+systems for 1980's microcomputers using this processor architecture
+(for example ZX81, Spectrum, Galaksija and many others). Generated
+assembly code can be assembled back with a number of Z80
+assemblers. Compatibility with z80asm was thoroughly tested.
+
+%prep
+%setup -q
+%patch -P 0 -p1 -b .16-bit-addr
+%configure
+
+%build
+make %{?_smp_mflags} CFLAGS="%{optflags}"
+
+%check
+make test
+
+%install
+make install DESTDIR="%{buildroot}"
+
+%files
+%doc COPYING AUTHORS NEWS README
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1*
+
+%changelog
+* Mon Feb 27 2012 Eric Smith <eric at brouhaha.com> 1.1.2-1
+- Initial version
More information about the scm-commits
mailing list