"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
The Assembler
This is the official home for the 6502, 65C02, 65CE02, 45GS02 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.
The Documentation
Have a look at the documentation.
The Binaries
The Source
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 SourceHut at https://hg.sr.ht/~bjonte/jasm.
Version History
-
1.32
- JSON import function.
- Break statement for loops.
- Optional argument to the BRK instruction.
- Arithmetic shift right operator.
- Shifts supports negative values.
- Assignment add for strings.
- Loop over characters in a string using range for.
- min() and max() functions can take a list argument.
- Fix for a bug that accepted null characters in include files.
- "petscii" conversion format has been replaced with "pet", "pet2001", "vic20", "c16", "plus4", "c64" and "c128".
-
1.31
- Fixed a serious bug where 16 bit branches in 65ce02 and 45gs02 jumped to the wrong address.
-
1.30
- Fixed a crash when a symbol definition referred to the constant or variable being created.
- Added loop limit of 1 million iterations.
- Added 7-bit ASCII conversion format.
- The list type now has a sort function.
- stq (nn,sp),y has been removed from 45gs02 instruction set
-
1.29
- Renamed the 'map' type to 'dict' to support the map instruction of the 45gs02.
- Added experimental support for Mega65 45GS02.
- Fixed a serious bug in 65CE02 where the program counter wasn't increased correctly for the addressing modes '#nnnn', 'b,nn' and 'b,nn,rel'.
-
1.28
- Added support for CSG 65CE02.
-
1.27
- Added support for Western Design Center 65C02.
- Break assembling after 100 passes.
- Fixed missing hex dump output from align statements.
-
1.26
- Locale support was broken in v1.25. This is now reverted to the C locale in Windows.
- Missing files are printed as warnings if errors are detected during tokenizing or syntax analysis to avoid confusing errors.
-
1.25
- Fixed a serious memory overwrite bug when multibyte characters are used in the source code.
- Unified all processors into one executable. The processor keyword is used to select processor.
- Include and incbin has moved from the tokenizer pass to the assemble pass to allow constructing include filenames programmatically.
- Added optional hex output.
- Project files for CodeBlocks and Visual Studio has been removed.
-
1.24
- Added pseudo instructions for 6502 and Z80.
- Added the ability to call a subroutine with a macro call style.
- Improved documentation regarding alignment.
- Added hi and lo properties on word storage types.
- Added logn function.
- Added uppercase and lowercase conversion functions.
- Added an option to name output files entirely after sections.
- Fixed a bug the section size limit wasn't enforced for child sections.
- Fixed a bug where 's' became a pound character in Petscii conversions.
-
1.23
- Strings can now contain the zero character (previously mistaken as the end of the string).
- Added a string conversion flag to set the 7th bit in the last character.
- Documentation has been html validated.
- The high byte operator (>) is guaranteed to return a 8 bit value if the bank mode has been enabled.
- Started cross compiling the Windows build. This will probably mean more frequent releases.
-
1.22
- Symbol difference dump added at debug verbosity when an oscillating state occurs. Also the generation pass is run to give more error information if that happens.
- Removed CodeBlocks project in favor of KDevelop.
- Migrated from Git to Mercurial.
-
1.21
- Fixed broken instruction data labels on Z80.
- Removed the special syntax for petscii strings and character literals. This is replaced by the string() function that now takes over the translation.
- Added string conversion to ZX80 and ZX81 character sets.
- If there are more addressing mode combinations that 11, the printout is skipped to avoid spamming the error log.
- Added No$GBA symbol dump format to aid ZX80/81 coding in EightyOne.
- Fixed unnamed scopes in the symbol dump file for repeat scopes and the root scope.
- Removed the initial namespace separator in symbol dump file.
- Allow exporting instruction data labels from modules.
-
1.20
- Added unicode function to convert a character to a string.
-
1.19
- 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.
-
1.18
- Fixed a serious problem in the z80 version where instruction names were colliding with keywords and property names.
- Fixed documentation bug.
- Optimized variable handling.
-
1.17
- 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.
-
1.16
- Fixed a serious bug that caused crashes if expressions contained macro calls that generated a lot of local variables.
-
1.15
- 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.
-
1.14
- 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.
-
1.13
- 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.
-
1.12
- Fixed setting word registers to negative values in Z80.
- Fixed a parsing bug in Z80 indirect addressing mode instructions.
-
1.11
- 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.
-
1.10
- Stderr is no longer used
- Select function like ternary if
- Modulo and remainder functions
- Multi bank mode truncates word arguments and definitions
-
1.9
-
1.8
- List support
- Range-based for loop
- Fixed cases where constant could be modified
-
1.7
- Z80 support
- C-style multiline comments
- Removed the -hraw argument. This is now default.
-
1.6
- 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
-
1.5
-
1.4
- Dynamically generated symbol names
- Print function
- Fixed a serious precedence and associativity bug in the expression evaluation
-
1.3
- Modules
- Macro call stack in error messages
-
1.2
- Generic predeclared symbols
- Macro code can use local variables surrounding the macro code
-
1.1
- Section parts
- Section part mappings
- Syntax highlighting for Sublime Text 3
- Local subroutines
- Reservation of zero sized arrays
- 1.0