"If you'll take thunder and lightning, and a steamboat and a buzz-saw, and mix 'em up, and put 'em into a woman, that's jAsm"
Zapac citing Josiah Gilbert Holland
This is the official home for the 6502 and Z80 assembler jAsm. jAsm was written by me, Jonas Hultén, during 7 months in 2015. It is heavily geared towards C64 development, since that's what it's intended to be used for. It currently runs on the 64-bit Linux and Windows platforms but it should be fairly easy to port it to other platforms since it has no dependencies except the standard C++ library.
Have a look at the documentation.
Windows binaries requires the C++ Redistributable for VS2015 to be installed.
As a tribute to Matthew Dillon, who created DAsm and released the source code to the public, I am releasing the source code to jAsm as well. I have used DAsm for many years and I have made smaller adjustments to suit my needs over the years. That wouldn't have been possible without access to the source code. I am very grateful and I am giving back to the community by releasing the source for free.
The source code is available on BitBucket at https://bitbucket.org/bjonte/jasm.
- Added unicode function to convert a character to a string.
- Fixed a serious problem in the z80 version where the automatic @i variable couldn't be used.
- It is now possible to make local variables with names using processor keywords.
- 6502 register names are now reserved keywords. It was possible to create global variables with register names. This change is one step towards storing a register type in a variable.
- Fixed a serious problem in the z80 version where instruction names were colliding with keywords and property names.
- Fixed documentation bug.
- Optimized variable handling.
- Fixed a bug where references to values were not followed when defining data.
- Floats can no longer be used as keys in maps since they shouldn't be compared for equality.
- Fixed a bug where different internal types were treated as different even if the value was actually the same.
- Optimized copy-on-write to only make copies if there are at least two references to the object. Large lists and maps were incredibly slow before this change.
- Fixed a serious bug that caused crashes if expressions contained macro calls that generated a lot of local variables.
- Fixed a serious bug that caused broken expressions if they contained a lot of operators.
- Dropped support for Code::Blocks due to bugs in the IDE. Now Sublime Text 3 and GDB is used instead.
- The map data type was added.
- The operator precedence for shift is now higher than multiply, divide, add and subtract.
- Fixed a bug where variables could be fetched from the previous assembly pass.
- The Z80 instructions adc, add, sbc and sub has mirrored addressing modes to support both immediate value and a register or only the immediate value.
- An unstable variable state is considered an error now.
- Fixed setting word registers to negative values in Z80.
- Fixed a parsing bug in Z80 indirect addressing mode instructions.
- Changed operator precendence so that &, | and ^ has higher priority than compare operators. This basically abandons the C-style precendence and adopts the Rust one.
- Added a warning for a code path passing through the end of a subroutine.
- Fixed a serious bug where local and global constants or variables with the same name could be mixed up in the root scope.
- Stderr is no longer used
- Select function like ternary if
- Modulo and remainder functions
- Multi bank mode truncates word arguments and definitions
- List support
- Range-based for loop
- Fixed cases where constant could be modified
- Z80 support
- C-style multiline comments
- Removed the -hraw argument. This is now default.
- Tailing comma allowed in enum definitions
- Ellipsis can be used in data definitions to create repeated patterns
- Fill byte can be specified when aligning memory
- Incbin takes optional arguments for start offset and max size
- Dynamically generated symbol names
- Print function
- Fixed a serious precedence and associativity bug in the expression evaluation
- Macro call stack in error messages
- Generic predeclared symbols
- Macro code can use local variables surrounding the macro code
- Section parts
- Section part mappings
- Syntax highlighting for Sublime Text 3
- Local subroutines
- Reservation of zero sized arrays