GithubHelp home page GithubHelp logo

david-li-l / assembler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hneemann/assembler

0.0 1.0 0.0 580 KB

Assembler for the Digital example processor

Assembly 5.38% Java 91.61% XSLT 3.02%

assembler's Introduction

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

  • In the folder src/main/asm are some sample programs in assembler. The assembler creates a hex file to be loaded to the instruction memory of the simulated processor.
  • You only need to start the simulator and load the example processor. Then you can control the simulator by the assembler GUI.
  • You can find the assembler in the folder src/main/java

Set up?

  • You can find the processor in the Digital repo or release ZIP as one of the examples.
  • The assembler is implemented in Java and is build with maven. So you can build it calling mvn install on the command line.
  • Most Java-IDE's are able to import the pom.xml file. Best maven support you can get using NetBeans.

assembler's People

Contributors

hneemann avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.