Assembler for Dr. Hernandez's ELC 451 toy processor

Version 1.0

(C) 2007 Nathan Blythe


Enter your assembly code here:

Debug mode: Off On
Machine code: Binary Hex

Assembly language format
This is a very simplistic assembly language, meant to make the tedious process of hand-writing machine code test programs for your processor a bit easier. The format is as follows.

(l0) lda &l1
This line is labeled "l0", and performs an LDA operation with the contents of the line labeled "l1".

(l1) $5555
This line is labeled "l1" and contains the constant 0x5555.

inca
Not all instructions require operands, and labels are optional.

lda * &l3
This line uses indirect addressing, denoted by the asterisk.

jpa $a
Constants need not be of fixed length.

(mylabel1) &mylabel2
(mylabel2) &mylabel1

Here we have two lines, each of which contains the address of the other.

That's about all there is! Even though all the possible instructions / addressing modes combinations are not shown, you should be able to figure out how to write any command you need from those examples.

This assembler is designed for Dr. Hernandez's toy processor as of February 2007. If the instruction set or format changes, this won't work anymore.

What does the default program do?
The default assembly program is a quine of sorts. The program copies itself into memory repeatedly, forever.

Source code
The source code (HTML and PHP) can be downloaded here.