Free NES assembler | |||||||||||||||||||||||||||||||||
1. Purpose
This program reads symbolic 6502/RP2A03/RP2A07 machine code
and compiles (assembles) it into a relocatable object file
or into an IPS patch.
The produced object file is binary-compatible with those made with XA65. 1.1. History
This program was born when Bisqwit needed to have something for
NES that is already accomplished for SNES by
snescom.
2. Linker
This package also contains a linker.
The linker can also be used to convert IPS patches into
binary files (an empty space is assumed to be the original
file), with the following command:
3. Supported syntax3.1. Mnemonics
The following mnemonics are supported:
3.2. Addressing modes
All the standard addressing modes of the 6502 cpu are supported.
Syntax:
3.3. Operand size control
There are several operand prefixes
that can be used to force a certain operand size/type.
3.4. Expression evaluation
Expressions are supported. These are valid code:
3.5. Segments
Code, labels and data can be generated to four segments:
text , data , zero and bss .Use .text , .data , .zero and .bss
respectively to select the segment.However, only the contents of text
and data segments are saved into
the o65 file. Labels are saved in all segments.
3.6. Comments
Comments begin with a semicolon (;) and end with a newline. A colon is allowed to appear in comment. 3.7. Command separation
Commands are separated by newlines and colons (:).
3.8. Code pointer relocation
You can use a command like *= $F200 to change
where the code goes by default.With IPS this is especially useful. You can change the code pointer as many times as you wish, but unless you're generating an IPS file, all code must be a continuous block. 3.9. Branch labels
The label - can be defined for local branches backward
and + for branches forward.
3.10. Preprocessor
nescom uses GCC as a preprocessor. You can use #ifdef , #ifndef , #define ,
#if , #endif and #include like
in any C program. (See bugs)
3.11. Object file format
nescom produces relocatable object files (O65),
non-relocatable patch files (IPS), or raw files. The O65 file format has been documented by André Fachat for the XA65 project. 3.12. IPS output support
This version of nescom allows you to create IPS files. This IPS format has been extended to allow you to specify global symbols and externs to be patched later. In the generated format:
3.13. Linkage selection
By default, O65 objects are linked to any free location in the ROM. IPS files are linked to predefined locations.
With the
This is not completely ready for NES yet. 4. Changelog
Nov 20 2005; 0.0.0 import from snescom-1.5.0.1. Nov 29 2005; 0.1.0 bugfixes, now it's functional. Dec 16 2005; 0.2.0 support for deeper "++" and "--" labels. Also support for .nop statement.Jun 20 2006; 1.0.0 raw output file format support in nescom. Also using boost::smart_ptr. Jul 26 2006; 1.1.0 has now a linker, and an example program. Jul 27 2006; 1.1.1 adds some consistency to ROM and NES address space conversions. Sep 21 2006; 1.1.2 adds clever_disasm and some documentation changes. Oct 9 2006; 1.1.3 fixes a crash & memory leak bug. May 13 2007; 1.1.3.1 fixes a bug regarding comments in #included files. Oct 27 2007; 1.1.4 added some new features in clever-disasm, and example ini files. Mar 27 2016; 1.1.8 added xa65 obj file support, and no longer depends on libboost. May 14 2016; 1.1.8.1 adds more example ini files for clever-disasm. Jul 12 2018; 1.2.0 added demo, partial rewrite for C++17 5. Known bugs
6. Copying
nescom has been written by Joel Yliluoma, a.k.a.
Bisqwit, and is distributed under the terms of the General Public License (GPL). If you happen to see this program useful for you, I'd appreciate if you tell me :) Perhaps it would motivate me to enhance the program. 7. Requirements
nescom uses GCC as a slave in
the preprocessing phase. Therefore, GCC must be installed and found
in the PATH when running nescom.
8. DownloadingDownloading help
The most recent source code (bleeding edge) for nescom can also be downloaded by cloning the Git repository by:
Date (Y-md-Hi) acc Size Name 2018-0712-1848 r-- 201505 nescom-1.2.0.tar.bz2 2018-0712-1848 r-- 224003 nescom-1.2.0.tar.gz 2016-0514-1200 r-- 166376 nescom-1.1.8.1.tar.bz2 2016-0514-1200 r-- 184741 nescom-1.1.8.1.tar.gz 2016-0327-1819 r-- 140764 nescom-1.1.8.tar.bz2 2016-0327-1819 r-- 159195 nescom-1.1.8.tar.gz 2013-0416-0850 r-- 131449 nescom-1.1.7.tar.bz2 2013-0416-0850 r-- 148806 nescom-1.1.7.tar.gz 2013-0301-1505 r-- 518041 nescom-1.1.6-dev-win32.zip 2012-1022-0816 r-- 112490 nescom-1.1.6.tar.bz2 2012-1022-0816 r-- 128113 nescom-1.1.6.tar.gz 2011-0612-1018 r-- 102111 nescom-1.1.5.2.tar.bz2 2011-0612-1018 r-- 117217 nescom-1.1.5.2.tar.gz 2010-0822-0146 r-- 100672 nescom-1.1.5.1.tar.bz2 2010-0822-0146 r-- 115795 nescom-1.1.5.1.tar.gz 2009-1230-1246 r-- 98730 nescom-1.1.5.tar.bz2 2009-1230-1246 r-- 113933 nescom-1.1.5.tar.gz 2007-1027-1727 r-- 92227 nescom-1.1.4.tar.bz2 2007-1027-1727 r-- 106050 nescom-1.1.4.tar.gz 2007-1027-1727 r-- 16104 patch-nescom-1.1.3.1-1.1.4.bz2 2007-1027-1727 r-- 17036 patch-nescom-1.1.3.1-1.1.4.gz 2007-1027-1727 r-- 20951 patch-nescom-1.1.3-1.1.4.bz2 2007-1027-1727 r-- 22378 patch-nescom-1.1.3-1.1.4.gz 2007-0513-0103 r-- 80947 nescom-1.1.3.1.tar.bz2 2007-0513-0103 r-- 94164 nescom-1.1.3.1.tar.gz 2007-0513-0103 r-- 7496 patch-nescom-1.1.3-1.1.3.1.bz2 2007-0513-0103 r-- 7636 patch-nescom-1.1.3-1.1.3.1.gz 2006-1008-2116 r-- 79465 nescom-1.1.3.tar.bz2 2006-1008-2116 r-- 92263 nescom-1.1.3.tar.gz 2006-1008-2116 r-- 6757 patch-nescom-1.1.2-1.1.3.bz2 2006-1008-2116 r-- 6882 patch-nescom-1.1.2-1.1.3.gz 2006-0920-2217 r-- 77164 nescom-1.1.2.tar.bz2 2006-0920-2217 r-- 88879 nescom-1.1.2.tar.gz 2006-0920-2217 r-- 17332 patch-nescom-1.1.1-1.1.2.bz2 2006-0920-2217 r-- 19219 patch-nescom-1.1.1-1.1.2.gz 2006-0727-1407 r-- 63261 nescom-1.1.1.tar.bz2 2006-0727-1407 r-- 72607 nescom-1.1.1.tar.gz 2006-0727-1407 r-- 4927 patch-nescom-1.1.0-1.1.1.bz2 2006-0727-1407 r-- 4776 patch-nescom-1.1.0-1.1.1.gz 2006-0727-1047 r-- 62982 nescom-1.1.0.tar.bz2 2006-0727-1047 r-- 72456 nescom-1.1.0.tar.gz 2006-0727-1047 r-- 17922 patch-nescom-1.0.0-1.1.0.bz2 2006-0727-1047 r-- 20336 patch-nescom-1.0.0-1.1.0.gz 2006-0620-0856 r-- 142578 nescom-1.0.0-win32.zip 2006-0620-1025 r-- 60392 nescom-1.0.0.tar.bz2 2006-0620-1025 r-- 69370 nescom-1.0.0.tar.gz 2006-0620-1025 r-- 9371 patch-nescom-0.2.0-1.0.0.bz2 2006-0620-1025 r-- 9320 patch-nescom-0.2.0-1.0.0.gz 2005-1216-1153 r-- 58979 nescom-0.2.0.tar.bz2 2005-1216-1153 r-- 67451 nescom-0.2.0.tar.gz 2005-1216-1153 r-- 5220 patch-nescom-0.1.0-0.2.0.bz2 2005-1216-1153 r-- 5141 patch-nescom-0.1.0-0.2.0.gz 2005-1129-1316 r-- 58289 nescom-0.1.0.tar.bz2 2005-1129-1316 r-- 66322 nescom-0.1.0.tar.gz 2005-1129-1316 r-- 33492 patch-nescom-0.0.0-0.1.0.bz2 2005-1129-1316 r-- 35796 patch-nescom-0.0.0-0.1.0.gz 2005-1119-2221 r-- 64913 nescom-0.0.0.tar.bz2 2005-1119-2221 r-- 73319 nescom-0.0.0.tar.gz← Back to the source directory index at Bisqwit's homepage | |||||||||||||||||||||||||||||||||