Browse Source

development/acme: Added (Family Cross Assembler).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
pull/285/head
B. Watson 8 months ago
committed by Willy Sudiarto Raharjo
parent
commit
5ab1423f1d
  1. 13
      development/acme/README
  2. 187
      development/acme/acme.1
  3. 109
      development/acme/acme.SlackBuild
  4. 10
      development/acme/acme.info
  5. 148
      development/acme/acme.rst
  6. 11
      development/acme/default_lib_path.diff
  7. 19
      development/acme/slack-desc
  8. 29
      development/acme/svn2tarxz.sh
  9. 60
      development/acme/toacme.1
  10. 49
      development/acme/toacme.rst

13
development/acme/README

@ -0,0 +1,13 @@
acme (6502 family cross assembler)
ACME is a free cross assembler released under the GNU GPL. It can
produce code for the following processors: 6502, 6510 (including
illegal opcodes), 65c02 and 65816. ACME supports the standard
assembler stuff like global/local/anonymous labels, offset assembly,
conditional assembly and looping assembly. It can include other source
files as well as binaries while assembling. Calculations can be done
in integer or float mode. Oh, and it is fast.
Note: If you're looking for a Plan9-flavored text editor called acme,
you're in the wrong place. Search for acme2k. If you're looking for an
ACME protocol client for use with LetsEncrypt, search for acme.sh.

187
development/acme/acme.1

@ -0,0 +1,187 @@
.\" 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 "ACME" 1 "2025-02-18" "0.97+20250126_r434" "SlackBuilds.org"
.SH NAME
acme \- 6502/65c02/65816 cross assembler
.\" RST source for acme(1) man page. Convert with:
.
.\" rst2man.py acme.rst > acme.1
.
.SH SYNOPSIS
.sp
acme [\fI\-options\fP] \fIFILE\fP ...
.SH DESCRIPTION
.sp
\fBacme\fP is a cross assembler for the 65xx range of processors. It knows
about the standard 6502, the 65c02 and the 65816. It also supports
the undocumented ("illegal") opcodes of the NMOS versions of the 6502,
like the 6510 variant that is used in the Commodore C=64, and it also
supports extensions to the intruction set done by other parties.
.sp
The full documentation for \fBacme\fP is installed in:
.INDENT 0.0
.INDENT 3.5
/usr/doc/acme\-0.97+20250126_r434
.UNINDENT
.UNINDENT
.sp
Start with \fBHelp.txt\fP\&. This man page just lists the command\-line options.
.sp
Note: the \fBACME\fP environment variable is not required in this build
of \fBacme\fP\&. If set, it will be respected, but if it\(aqs not set, the
assembler will look for include files in \fB/usr/share/acme/ACME_Lib\fP\&.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-h\fP,\fB \-\-help
show this help and exit
.UNINDENT
.INDENT 0.0
.TP
.B \-f,\-\-format \fIFORMAT\fP
set output file format
.TP
.B \-o,\-\-outfile \fIFILE\fP
set output file name
.TP
.B \-r,\-\-report \fIFILE\fP
set report file name
.TP
.B \-l,\-\-symbollist \fIFILE\fP
set symbol list file name
.UNINDENT
.INDENT 0.0
.TP
.B \-\-labeldump
old name for \-\-symbollist
.UNINDENT
.INDENT 0.0
.TP
.B \-\-vicelabels \fIFILE\fP
set file name for label dump in VICE format
.TP
.B \-\-setpc \fIVALUE\fP
set program counter
.TP
.B \-\-from\-to \fIVALUE\fP \fIVALUE\fP
set start and end+1 of output file
.TP
.B \-\-cpu \fICPU\fP
set target processor
.TP
.B \-\-initmem \fIVALUE\fP
define \(aqempty\(aq memory
.TP
.B \-\-maxerrors \fINUMBER\fP
set number of errors before exiting
.TP
.B \-\-maxdepth \fINUMBER\fP
set recursion depth for macro calls and !src
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ignore\-zeroes
do not determine number size by leading zeroes
.TP
.B \-\-strict\-segments
turn segment overlap warnings into errors
.TP
.B \-\-strict
treat all warnings like errors
.UNINDENT
.INDENT 0.0
.TP
.B \fB\-v0\fP \fIthrough\fP \fB\-v9\fP
set verbosity level. no space allowed between \fB\-v\fP and the number.
.TP
.B \-D \fISYMBOL=VALUE\fP
define global symbol
.TP
.B \-I \fIPATH/TO/DIR\fP
add search path for input files
.UNINDENT
.INDENT 0.0
.TP
.BI \-W\fB no\-label\-indent
suppress warnings about indented labels
.TP
.BI \-W\fB no\-old\-for
(old, use "\-\-dialect 0.94.8" instead)
.TP
.BI \-W\fB no\-bin\-len
suppress warnings about lengths of binary literals
.TP
.BI \-W\fB type\-mismatch
enable type checking (warn about type mismatch)
.TP
.B \-\-use\-stdout
fix for \(aqRelaunch64\(aq IDE (see docs)
.TP
.B \-\-msvc
output errors in MS VS format
.TP
.B \-\-color
use ANSI color codes for error output
.TP
.B \-\-fullstop
use \(aq.\(aq as pseudo opcode prefix
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dialect \fIVERSION\fP
behave like different version
.TP
.B \-\-debuglevel \fIVALUE\fP
drop all higher\-level debug messages
.UNINDENT
.INDENT 0.0
.TP
.B \-\-test
enable experimental features
.TP
.B \-V\fP,\fB \-\-version
show version and exit
.UNINDENT
.SH COPYRIGHT
.sp
See the file /usr/doc/acme\-0.97+20250126_r434/COPYING for license information.
.SH AUTHORS
.sp
acme was written by Marco Baye.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
\fBtoacme\fP(1)
.sp
The acme homepage: \fI\%https://sourceforge.net/projects/acme\-crossass/\fP
.\" Generated by docutils manpage writer.
.

109
development/acme/acme.SlackBuild

@ -0,0 +1,109 @@
#!/bin/bash
# Slackware build script for acme
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# Note: the latest release is from 2020. There's no source tarball for
# it (only binaries for Win and Mac). I had to create my own source
# tarball from the SVN repo, so I went ahead and packaged the latest
# SVN.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=acme
VERSION=${VERSION:-0.97+20250126_r434}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
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.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod -h 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod -h 644 {} +
# fix warnings that probably actually cause problems on 64-bit.
[ -n "$LIBDIRSUFFIX" ] && \
sed -i '/^typedef.*intval_t/s,\<int\>,long,' src/config.h
# look in /usr/share/acme for the asm includes, if ACME not set
# in the environment.
patch -p1 < $CWD/default_lib_path.diff
make -C src CFLAGS="$SLKCFLAGS"
make -C contrib/toacme/src CFLAGS="$SLKCFLAGS"
mkdir -p $PKG/usr/bin
install -s -m0755 contrib/toacme/src/toacme src/$PRGNAM $PKG/usr/bin
# this says it converts "masm" syntax to acme, but I don't know what "masm"
# it means (definitely *not* Microsoft's MASM, which doesn't support 6502).
install -m0755 contrib/toacme/masm2acme.py $PKG/usr/bin
# man pages written by SlackBuild author (mostly copy/paste from docs).
mkdir -p $PKG/usr/man/man1
for i in acme toacme; do
gzip -9c < $CWD/$i.1 > $PKG/usr/man/man1/$i.1.gz
done
# asm includes (we patched it to look for them here, above).
SHARE=$PKG/usr/share/acme
mkdir -p $SHARE
cp -a ACME_Lib $SHARE
# syntax support for a couple of editors. untested.
cp -a contrib/{joe_syntax,ultraedit_wordfile} $SHARE
# this doesn't need to be in the package.
rm -f contrib/toacme/docs/INSTALL
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC/toacme
cp -a docs/* examples $PKGDOC
cp -a contrib/toacme/docs/* $PKGDOC/toacme
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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

10
development/acme/acme.info

@ -0,0 +1,10 @@
PRGNAM="acme"
VERSION="0.97+20250126_r434"
HOMEPAGE="https://sourceforge.net/projects/acme-crossass/"
DOWNLOAD="https://slackware.uk/~urchlay/src/acme-0.97+20250126_r434.tar.xz"
MD5SUM="8b23f211b6907003e5390a1763a17143"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

148
development/acme/acme.rst

@ -0,0 +1,148 @@
.. RST source for acme(1) man page. Convert with:
.. rst2man.py acme.rst > acme.1
.. |version| replace:: 0.97+20250126_r434
.. |date| date::
====
acme
====
--------------------------------
6502/65c02/65816 cross assembler
--------------------------------
:Manual section: 1
:Manual group: SlackBuilds.org
:Date: |date|
:Version: |version|
SYNOPSIS
========
acme [*-options*] *FILE* ...
DESCRIPTION
===========
**acme** is a cross assembler for the 65xx range of processors. It knows
about the standard 6502, the 65c02 and the 65816. It also supports
the undocumented ("illegal") opcodes of the NMOS versions of the 6502,
like the 6510 variant that is used in the Commodore C=64, and it also
supports extensions to the intruction set done by other parties.
The full documentation for **acme** is installed in:
/usr/doc/acme-|version|
Start with **Help.txt**. This man page just lists the command-line options.
Note: the **ACME** environment variable is not required in this build
of **acme**. If set, it will be respected, but if it's not set, the
assembler will look for include files in **/usr/share/acme/ACME_Lib**\.
OPTIONS
=======
-h, --help
show this help and exit
-f,--format *FORMAT*
set output file format
-o,--outfile *FILE*
set output file name
-r,--report *FILE*
set report file name
-l,--symbollist *FILE*
set symbol list file name
--labeldump
old name for --symbollist
--vicelabels *FILE*
set file name for label dump in VICE format
--setpc *VALUE*
set program counter
--from-to *VALUE* *VALUE*
set start and end+1 of output file
--cpu *CPU*
set target processor
--initmem *VALUE*
define 'empty' memory
--maxerrors *NUMBER*
set number of errors before exiting
--maxdepth *NUMBER*
set recursion depth for macro calls and !src
--ignore-zeroes
do not determine number size by leading zeroes
--strict-segments turn segment overlap warnings into errors
--strict treat all warnings like errors
**-v0** *through* **-v9**
set verbosity level. no space allowed between **-v** and the number.
-D *SYMBOL=VALUE*
define global symbol
-I *PATH/TO/DIR*
add search path for input files
-Wno-label-indent suppress warnings about indented labels
-Wno-old-for (old, use "--dialect 0.94.8" instead)
-Wno-bin-len suppress warnings about lengths of binary literals
-Wtype-mismatch enable type checking (warn about type mismatch)
--use-stdout fix for 'Relaunch64' IDE (see docs)
--msvc output errors in MS VS format
--color use ANSI color codes for error output
--fullstop use '.' as pseudo opcode prefix
--dialect *VERSION*
behave like different version
--debuglevel *VALUE*
drop all higher-level debug messages
--test
enable experimental features
-V, --version
show version and exit
COPYRIGHT
=========
See the file /usr/doc/acme-|version|/COPYING for license information.
AUTHORS
=======
acme was written by Marco Baye.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SEE ALSO
========
**toacme**\(1)
The acme homepage: https://sourceforge.net/projects/acme-crossass/

11
development/acme/default_lib_path.diff

@ -0,0 +1,11 @@
diff -Naur acme-20250126_r434/src/platform.c acme-20250126_r434.patched/src/platform.c
--- acme-20250126_r434/src/platform.c 2025-02-17 18:03:46.000000000 -0500
+++ acme-20250126_r434.patched/src/platform.c 2025-02-17 18:26:16.166315740 -0500
@@ -45,6 +45,7 @@
// Find out the path of ACME's library
env_var = getenv("ACME");
+ if(!env_var) env_var = "/usr/share/acme/ACME_Lib";
// if environment variable was found, make a copy
if (env_var) {
dynabuf_clear(GlobalDynaBuf);

19
development/acme/slack-desc

@ -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------------------------------------------------------|
acme: acme (6502 family cross assembler)
acme:
acme: ACME is a free cross assembler released under the GNU GPL. It can
acme: produce code for the following processors: 6502, 6510 (including
acme: illegal opcodes), 65c02 and 65816. ACME supports the standard
acme: assembler stuff like global/local/anonymous labels, offset assembly,
acme: conditional assembly and looping assembly. It can include other source
acme: files as well as binaries while assembling. Calculations can be done
acme: in integer or float mode. Oh, and it is fast.
acme:
acme:

29
development/acme/svn2tarxz.sh

@ -0,0 +1,29 @@
#!/bin/bash
# create a source tarball from upstream's SVN repo.
# this would be easier, with git.
PRGNAM=acme
URL=https://svn.code.sf.net/p/acme-crossass/code-0/trunk
rm -rf $PRGNAM.svn
svn co $URL $PRGNAM.svn
cd $PRGNAM.svn
svn log -l 1 | grep '^r[0-9]' > logtmp
RELEASE="$( grep '^ *#define *RELEASE' src/version.h | cut -d'"' -f2 )"
DATE=$( grep '^r[0-9]' logtmp | cut -d'|' -f3 | cut -d' ' -f2 | sed 's,-,,g' )
REV=$( cut -d' ' -f1 logtmp )
VERSION="$RELEASE+${DATE}_$REV"
DIR=$PRGNAM-$VERSION
rm -rf .svn logtmp
cd -
rm -rf $DIR $DIR.tar.xz
mv $PRGNAM.svn $DIR
tar cvfJ $DIR.tar.xz $DIR
echo
md5sum $DIR.tar.xz

60
development/acme/toacme.1

@ -0,0 +1,60 @@
.\" 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 "ACME" "" "" ""
.SH NAME
acme \- converts other assemblers' source code to ACME format
.\" RST source for toacme(1) man page. Convert with:
.
.\" rst2man.py toacme.rst > toacme.1
.
.SH SYNOPSIS
.sp
toacme \fIformat\fP \fIinput\-file\fP \fIoutput\-file\fP
.SH DESCRIPTION
.sp
\fBtoacme\fP converts 6502 assembly source in various formats (mostly
Commodore 64/128) to \fBacme\fP format. Run \fBtoacme\fP with no arguments
to see the list of supported formats.
.SH COPYRIGHT
.sp
See the file /usr/doc/acme\-0.97+20250126_r434/COPYING for license information.
.SH AUTHORS
.sp
toacme was written by Marco Baye.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
\fBacme\fP(1)
.sp
The acme homepage: \fI\%https://sourceforge.net/projects/acme\-crossass/\fP
.\" Generated by docutils manpage writer.
.

49
development/acme/toacme.rst

@ -0,0 +1,49 @@
.. RST source for toacme(1) man page. Convert with:
.. rst2man.py toacme.rst > toacme.1
.. |version| replace:: 0.97+20250126_r434
.. |date| date::
====
acme
====
-----------------------------------------------------
converts other assemblers' source code to ACME format
-----------------------------------------------------
SYNOPSIS
========
toacme *format* *input-file* *output-file*
DESCRIPTION
===========
**toacme** converts 6502 assembly source in various formats (mostly
Commodore 64/128) to **acme** format. Run **toacme** with no arguments
to see the list of supported formats.
The full documentation for **toacme** is installed in:
/usr/doc/acme-|version|/toacme
COPYRIGHT
=========
See the file /usr/doc/acme-|version|/toacme/COPYING for license information.
AUTHORS
=======
toacme was written by Marco Baye.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SEE ALSO
========
**acme**\(1)
The acme homepage: https://sourceforge.net/projects/acme-crossass/
Loading…
Cancel
Save