Android / iOS



Posted: July 25, 2012
Updated: May 8, 2016


Since I was adding new CPU support to naken430asm I decided to rename it to naken_asm. This is a raw, simple assembler. I have some include files for msp430 in the repo or there is a second set of include files made by Alexander Zhevak. Include files from Microchip for dsPIC work after being run through an included script and Atmel include files work directly from Atmel. As a side project, with help from Joe, we have been putting together a Java .class compiler called Java Grinder which produces output that can be compiled with naken_asm.

CPU asm disasm sim cycle counter Java Grinder Author
6502 / 6510 Stable Stable Beta Yes Yes Joe Davisson
65C816 Stable Alpha   Yes Yes Joe Davisson
6800 Beta Beta   No No Michael Kohn
6809 Stable Stable   Yes Yes Michael Kohn
68H08 Beta Beta   Yes No Michael Kohn
68000 Stable Stable   No Yes Michael Kohn
8051 / 8052 Beta Beta   No No Michael Kohn
ARM Beta Beta   No No Michael Kohn
Atmel AVR8 Stable Stable Beta Yes Yes Michael Kohn
dsPIC / PIC24 Stable Stable   Yes Yes Michael Kohn
Emotion Engine Beta Beta   No No Michael Kohn
Emotion Engine VU Beta Beta   No No Michael Kohn
Epiphany Beta Beta   No No Michael Kohn
MIPS32 Stable Stable Beta No Yes Michael Kohn
MIPS64 Alpha Alpha   No No Michael Kohn
MSP430 Stable Stable Stable Yes Yes Michael Kohn
MSP430X Stable Stable   No Yes Michael Kohn
PIC32 (MIPS32) Stable Stable Beta No Yes Michael Kohn
Propeller Beta Beta   Yes Yes Michael Kohn
STM8 Stable Stable   Yes No Michael Kohn
THUMB Beta Beta   No No Michael Kohn
TMS1000 / TMS1100 Stable Stable   No No Michael Kohn
TMS9900 Stable Stable   Yes Yes Michael Kohn
Z80 Stable Stable Alpha Yes Yes Michael Kohn

Stable here means I've been using it and proved it's working well. Beta means all the code is down but I haven't gotten a chance to write much code around it. If anyone else has been using one of these assemblers / disassemblers and finds it stable please let me know.

naken_asm-2016-02-27.tar.gz (Source) (Windows Binary)
naken_asm-2016-02-27-macosx10.10-x86_64.tar.gz (MacOSX)
naken_asm-2016.02.27-1.el7.centos.x86_64.rpm (CentOS Linux)

The source code is for compiling on Linux, BSD, or any other OS. Just install gcc and type ./configure and then make.

Repository: git clone

naken_asm-2015-12-28.tar.gz (Source)
naken_asm-2015-11-24.tar.gz (Source)
naken_asm-2015-04-04.tar.gz (Source)
naken_asm-2015-01-07.tar.gz (Source)
naken_asm-2014-12-04.tar.gz (Source)
naken_asm-2014-10-27.tar.gz (Source)
naken_asm-2014-10-26.tar.gz (Source)
naken_asm-2014-09-09.tar.gz (Source)

How To Help

  • Use the assembler. Send me bug reports, suggestions, or just let me know you're using it.
  • Spread the word. Link to this page.
  • Create a package for a distribution (BSD/Linux etc).
  • Development boards and other toys would be fun :).


launchpad_blink.asm - Make 2 LED's blink with the MSP430 Launchpad
CamelForth - Brad Rodriguez has an implementation of Forth assembled with naken_asm.
Genesis Demo - A little demo of code written in Java, compiled with Java Grinder, and assembled with naken_asm.
Apple IIgs Demo - A little demo Joe Davisson made of code written in Java, compiled with Java Grinder, and assembled with naken_asm.
Commodore 64 Demo - A little demo Joe Davisson made showing a Commodore 64 demo written in Java, compiled with Java Grinder, and assembled with naken_asm.
TI99/4A Demo - A little demo of code written in Java, compiled with Java Grinder, and assembled with naken_asm.
dsPIC Mandelbrots - Compute Mandelbrots with the DSP module of the dsPIC

Test Strategy

In order to give confidence that naken_asm isn't going to hinder anyone else's development, I've been adding 3 different types of tests to the build system. The unit and regression tests should be obvious what they do. For the comparison tests, I created a text file with every single instruction, assembled each instruction one by one using someone else's assembler (usually the GNU gas assembler), and used a bash script to compare the output of naken_asm with the output of these assemblers.

Chip Info

65xx - Support for 6502, 65c02, 6507, 6510, and any chip of this 8 bit family.

65C816 - Support for the 16 bit version of the 6502. Example of this working here: Apple IIgs Java

6800 / 6809 - Support for CPU's compatible with the 6800 / 6809 instruction set.

68HC08/CPU08 - 68HC08 microcontroller instruction (CPU08). I did this specifically for the 68HC908GP32.

680x0/CPU32 - My target for this minimum 68000 for Amiga programming or Sega Genesis or such. I may add Amiga executable support for input and output.

8051/8052 - Support for 8051 and 8052 8 bit family chips (also known as MCS-51). I tested some code on an Atmel AT89S52.

ARM - Disassembler and assembler are mostly done for generic instructions. I made a small program to prove it working on the Raspberry Pi here.

MIPS - Farnell sent me a chipKIT UNO32 so I can add MIPS support to naken_asm. I have all the basic MIPS instructions assembling and disassembling. Just need to test it.

STM8 - Added support for STM8. Valentin Dudouyt has created a tool to flash the STM8 Disovery board with Linux:

TMS1000/TMS1100 - An old TI 4 bit CPU that's used in the Speak & Spell, Speak & Math, some old calculators, and others.

TMS9900 - One of the first 16 bit CPUs. From the looks of it it seems to be the grandfather of the MSP430. I didn't use TMS9900 standard syntax for hex, but I can change it if i get requests.

Unit Tests: eval_exression(), var.h

Regression Tests: 805x, avr8, dspic, msp430, stm8, tms9900, z80

Comparison Tests: 6502, ARM (not complete), msp430x, STM8, Z80, dsPIC, Epiphany


I've been working on a README I'm going to start including with the download:


June 4, 2016: Working on the Playstation 2 Emotion Engine vector unit assembler. Finding what appear to be errors in the documentation for the vector units. The instruction ABS.dest fs, ft appears it should be written as ABS.dest ft, fs. The gnu-as assembler for the vector units want ft, fs. I'm going with the GNU on this, but need to look into this later.

May 12, 2016: Emotion Engine is complete. Now I have to decide if I also want to enter the MIPS SIMD instructions (since MIPS has its own vector instructions that are different from the Playstation 2's vector instructions).

May 8, 2016: I've been adding MIPS64 and Playstation 2 Emotion Engine instructions. I really want to make a Playstation 2 demo, but we'll see. This PDF I'm using with all the Emotion Engine instructions has all kinds of errors in it. Most are easy to pick out (instructions labeled as the wrong version of MIPS) but at least one instruction for sure has the wrong opcode. The tests against gcc for EE should pick those out at least.

January 29, 2016: Added Parallax Propeller to the assemblers / disassemblers. Haven't tested it yet. Hoping to add it to Java Grinder in the next couple weeks and get code running on a chip.

April 25, 2015: Progress is still going on here. Joe has added 65816 along with automated tests and rewrote the 6502 assembler. I've added automated testing for 68000 and I'm working on ARM.

Copyright 1997-2016 - Michael Kohn