Free NES assembler | |||||||||||||||||||||||||||||||||
0. Contents
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. 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
Date (Y-md-Hi) acc Size Name 2010-0822-0446 r-- 100672 nescom-1.1.5.1.tar.bz2 2010-0822-0446 r-- 115809 nescom-1.1.5.1.tar.gz 2009-1230-1446 r-- 98730 nescom-1.1.5.tar.bz2 2009-1230-1446 r-- 113952 nescom-1.1.5.tar.gz 2007-1027-2027 r-- 92227 nescom-1.1.4.tar.bz2 2007-1027-2027 r-- 106061 nescom-1.1.4.tar.gz 2007-1027-2027 r-- 16104 patch-nescom-1.1.3.1-1.1.4.bz2 2007-1027-2027 r-- 17055 patch-nescom-1.1.3.1-1.1.4.gz 2007-1027-2027 r-- 20951 patch-nescom-1.1.3-1.1.4.bz2 2007-1027-2027 r-- 22395 patch-nescom-1.1.3-1.1.4.gz 2007-0513-0403 r-- 80947 nescom-1.1.3.1.tar.bz2 2007-0513-0403 r-- 94173 nescom-1.1.3.1.tar.gz 2007-0513-0403 r-- 7496 patch-nescom-1.1.3-1.1.3.1.bz2 2007-0513-0403 r-- 7640 patch-nescom-1.1.3-1.1.3.1.gz 2006-1009-0016 r-- 79465 nescom-1.1.3.tar.bz2 2006-1009-0016 r-- 92273 nescom-1.1.3.tar.gz 2006-1009-0016 r-- 6757 patch-nescom-1.1.2-1.1.3.bz2 2006-1009-0016 r-- 6892 patch-nescom-1.1.2-1.1.3.gz 2006-0921-0117 r-- 77164 nescom-1.1.2.tar.bz2 2006-0921-0117 r-- 88888 nescom-1.1.2.tar.gz 2006-0921-0117 r-- 17332 patch-nescom-1.1.1-1.1.2.bz2 2006-0921-0117 r-- 19227 patch-nescom-1.1.1-1.1.2.gz 2006-0727-1707 r-- 63261 nescom-1.1.1.tar.bz2 2006-0727-1707 r-- 72619 nescom-1.1.1.tar.gz 2006-0727-1707 r-- 4927 patch-nescom-1.1.0-1.1.1.bz2 2006-0727-1707 r-- 4782 patch-nescom-1.1.0-1.1.1.gz 2006-0727-1347 r-- 62982 nescom-1.1.0.tar.bz2 2006-0727-1347 r-- 72465 nescom-1.1.0.tar.gz 2006-0727-1347 r-- 17922 patch-nescom-1.0.0-1.1.0.bz2 2006-0727-1347 r-- 20344 patch-nescom-1.0.0-1.1.0.gz 2006-0620-1156 r-- 143024 nescom-1.0.0-win32.zip 2006-0620-1325 r-- 60392 nescom-1.0.0.tar.bz2 2006-0620-1325 r-- 69381 nescom-1.0.0.tar.gz 2006-0620-1325 r-- 9371 patch-nescom-0.2.0-1.0.0.bz2 2006-0620-1325 r-- 9332 patch-nescom-0.2.0-1.0.0.gz 2005-1216-1353 r-- 58979 nescom-0.2.0.tar.bz2 2005-1216-1353 r-- 67461 nescom-0.2.0.tar.gz 2005-1216-1353 r-- 5220 patch-nescom-0.1.0-0.2.0.bz2 2005-1216-1353 r-- 5144 patch-nescom-0.1.0-0.2.0.gz 2005-1129-1516 r-- 58289 nescom-0.1.0.tar.bz2 2005-1129-1516 r-- 66329 nescom-0.1.0.tar.gz 2005-1129-1516 r-- 33492 patch-nescom-0.0.0-0.1.0.bz2 2005-1129-1516 r-- 35800 patch-nescom-0.0.0-0.1.0.gz 2005-1120-0021 r-- 64913 nescom-0.0.0.tar.bz2 2005-1120-0021 r-- 73326 nescom-0.0.0.tar.gz← Back to the source directory index at Bisqwit's homepage | |||||||||||||||||||||||||||||||||