- Notifications
You must be signed in to change notification settings - Fork24
SPASM-ng is a z80 assembler with extra features to support development for TI calculators.
License
alberthdev/spasm-ng
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SPASM-ng is a z80/eZ80 assembler with extra features to support developmentfor TI calculators.
Releases with pre-built binaries may be found here:
On Windows, you will need the following to build SPASM-ng:
Visual Studio with C++ support
Visual Studio 2010 or newer is recommended, but it may be possibleto downgrade. Seehttp://stackoverflow.com/a/16196505 for more info.
Note that if you're using Visual Studio 2010, SP1 or newer is required.Without the service pack, the build will fail.
Visual Studio Express editions can be used for building.This include Express for Desktop, Visual C++ Express, etc.
If you want to build with COM support, however, you will need the ATLinclude files. You can get these by either:
- using Visual Studio Community (2015+, free w/restrictions);
- using Visual Studio Professional;
- installing Windows SDKs that contain the ATL include files, andreconfiguring the project accordingly.
On Linux, Mac OS X, and other *nix, you will need the following tobuild SPASM-ng:
- C/C++ Compiler (GCC, Clang, etc.)
- GMP Library (found athttps://gmplib.org/)
- OpenSSL Library (found athttps://www.openssl.org/)
Note that if you are using Linux, your distribution will likely havepre-built packages (and development packages) available to install.You should use these first before attempting to install the abovelibraries yourself.
Suggested packages for Ubuntu/Debian:
- build-essential
- libssl-dev
- zlib1g-dev
- libgmp-dev
- checkinstall (optional, only if you want to build Debian packages -.deb files)
If building without app signing support (seeBuilding in this document),GMP and OpenSSL are not required.
To run the tests, you will also need Python 3.1+. Versions belowPython 3.1 will not work!
On Windows, simply build with the included Visual Studio project file.
If you wish to build with COM support, you must:
- define
SPASM_NG_ENABLE_COM
globally within the Visual Studioproject; - ensure that ATL include files are accessible.
On Linux, Mac OS X, and other *nix, simply build by running:
# Git users: run this to update the version# ONLY RUN THIS IF YOU ARE USING GITmake version# Now build!make# Optional: install SPASM-ng (you may need sudo/su/root):make install
To disable app signing support in your binary (thus eliminating thedependencies on OpenSSL and GMP), define NO_APPSIGN when invokingmake
:
make NO_APPSIGN=1
For Debian systems, you can run the following to create a Debianpackage:
# You should "make clean" before running this!make clean# Create a Debian package (builds opt target):make debian
Other Makefile commands:
# You should "make clean" before running any of this!make clean# Build with -static (static linking, bigger binary due to# including libraries):make static# Build with -O3 optimization:make opt# Build with both -static and -O3 optimization:make opt-static# Create tarball of spasm-ng binary (builds opt-static target):make tar
Cross-compiling can be enabled by simply setting the cross-compilingprefix, e.g.
make CROSS_COMPILE=i686-w64-mingw32-
The program accepts standard Z80 assembly and eZ80 assembly.
SPASM command line help shown below:
SPASM-ng Z80 Assembler by Spencer Putt and Don Straneyspasm [options] <input file> <output file>Options:-E = Assemble eZ80 code-T = Generate code listing-C = Code counter mode-L = Symbol table mode-S = Stats mode-O = Don't write to output file-I [directory] = Add include directory-A = Labels are cAse-sensitive-D<name>[=value] = Create a define 'name' [with 'value']-N = Don't use colors for messages-V <Expression> = Pipe expression directly into assembly
Added features for eZ80 code include:
- The .ASSUME ADL={0 or 1} directive for specifying 16-bit or 24-bit code (24-bit is the default).
- The .DL and .LONG directives for including 24-bit data.
- Mode-change suffixes available for all instructions, as seen in the eZ80 manual.
Report issues/bugs to the issue tracker, found here:
https://github.com/alberthdev/spasm-ng/issues
SPASM-ng was originally from the SPASM project, and was forked to fix afew bugs. It was originally written by Spencer Putt and Don Straney,with additional development by Chris Shappell and James Montelongo.
License:
SPASM-ng - a z80 assembler with extra features to support dev for TI calcs!Copyright (C) 2015 Spencer Putt and Don StraneyCopyright (C) 2015 Chris Shappell and James MontelongoCopyright (C) 2015 Albert Huang (fixes to SPASM)Copyright (C) 2015 Brendan Fletcher (eZ80 support)This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public License alongwith this program; if not, write to the Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
About
SPASM-ng is a z80 assembler with extra features to support development for TI calculators.