Git Product home page Git Product logo

230assembler's Introduction

This is the readme for our 230 assembler

Assembler.java accepts as input a .txt file from the command line and outputs .mif formatted tex to the stdout.

Commands should be formatted as follows:

CMD1  ARG1,ARG2,ARG3
CMD2  ARG4,ARG6,ARG6
CMD3, ARG7,ARG8
ETC.

If you want to include immediate commands, don't put them in parenthesis, include them like a normal command
Even if the immediate value is going to be 0, include that in the line.

Here is the specific arguments for each command:
For R-Type Instructions:
  add,sub,and,or,xor,sll:
	  destinationReg,source1,source2
	  destinationReg,source1,source2
  cmp:
	  0,source1,source2
  jr:
	  0,source1,0

For D-Type Instructions:
  lw,sw,addi: 
	  destinationReg,sourceReg,Immediate
	  destinationReg,sourceReg,Immediate
	  destinationReg,sourceReg,Immediate
For B-Type Instructions:
  b,bal:
	  Label
For J-Type Instructions:
  j,jal:
	  constant
  li:
	  destinationReg,constant

Values must be entered in two's complement hex before being put into the assembler

EXAMPLES:

ADD r1,r2,r3
ADD 1,2,3

Assembly: LW r2,(12)r5
My Assembler: LW 2,C,5

If you want to include the S bit, simply add 'S' to the beginning of your command:

SCMD  ARG1,ARG2,ARG3

230assembler's People

Contributors

vicfrank avatar

Watchers

James Cloos avatar  avatar  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.