js-4004-assembler
is an assembler for Intel 4004 microprocessor, written in javascript. Despite being the first 4-bit microprocessor from Intel, the 4004 has a surprisingly complex opcodes. However, the opcode table is simple enough. Also, it is important to mention that this assembler only accepts numbers for registers and conditions, instead of names or symbols. It is a very crude assembler.
The source file test.asm
with 4004 instructions.
Run assembler as node main <destination> <source>
.
Here it is node main test.bin test.asm
.