Home

Awesome

Build Status

Download latest Release

The most recent changes are listed in the release notes.

ASM 3

screnshot

In this repo you can find an assembler for a simulated 16 bit microprocessor which is realized as a Digital simulation. You can find the processor itself as one of the examples in the Digital repository or in the distributed zip file. The processor is a 16 bit harvard single cycle cpu and it is inspired by the MIPS architecture. Only the handling of long constants is a bit of a hack to avoid a 32 bit instruction memory.
The assembler supports pseudo instructions like push, pop, enter, leave or call and ret [n]. So it is also possible to program more like for a x86 cisc processor.
The assembler has a simple GUI and is able to control the simulator by using its TCP/IP interface. So it is easy to debug an assembly program within the simulator.

Interfacing the Simulator

If you are interested in how to interface the simulator you can take a look at this class. These are just a few lines of simple code, and it should be easy to translate it into any other language you want to use.

How it works

A list of the supported ASM instructions is included in the distributed zip file (instructions.pdf). If you are interested in modifying how the instructions are encoded, look at the file Opcode.java. The instructions and the associated flags used for the control unit are listed there. Some instructions are available in two variants: The mnemonics with a lower case 's' attached, describes the instruction with a special encoding for a short constant, which can be included in the instruction itself.

Usage

Set up?