Git Product home page Git Product logo

mips-assembler's Introduction

MIPS Assembler

Compiling

The code is targeted for C++11 and can be compiled using make:

$ make

Running

To run the assembler:

$ ./build/main examples/MA/addArray.asm

The hex will be printed to stdout.

Testing

All the example tests have been copied to examples/MA/. I was not able to get the included Perl script working; however, I've included a Bash script that will run the tests:

$ ./tests.sh

This script is also slightly more advanced than the Perl script, as it checks for zero output on bad input tests.

All tests should be passing:

 |=== Checking: [examples/MA/addArray.asm] ===|
 |=== Checking: [examples/MA/arrayCopy.asm] ===|
 |=== Checking: [examples/MA/branch1.asm] ===|
 |=== Checking: [examples/MA/branch2.asm] ===|
 |=== Checking: [examples/MA/daddiu.asm] ===|
 |=== Checking: [examples/MA/decrement.asm] ===|
 |=== Checking: [examples/MA/dump.asm] ===|
 |=== Checking: [examples/MA/factorial.asm] ===|
 |=== Checking: [examples/MA/fibo.asm] ===|
 |=== Checking: [examples/MA/fiboLoop.asm] ===|
 |=== Checking: [examples/MA/iterate.asm] ===|
 |=== Checking: [examples/MA/iterate2.asm] ===|
 |=== Checking: [examples/MA/loadsDaddiStores.asm] ===|
 |=== Checking: [examples/MA/loadsDaddiuStores.asm] ===|
 |=== Checking: [examples/MA/loadsDaddsStores.asm] ===|
 |=== Checking: [examples/MA/loadsDsubsStores.asm] ===|
 |=== Checking: [examples/MA/loadsFPAddsStores.asm] ===|
 |=== Checking: [examples/MA/loadsFPDivsStores.asm] ===|
 |=== Checking: [examples/MA/loadsFPMultsStores.asm] ===|
 |=== Checking: [examples/MA/loadsStores1.asm] ===|
 |=== Checking: [examples/MA/loadsStores2.asm] ===|
 |=== Checking: [examples/MA/loop10times.asm] ===|
 |=== Checking: [examples/MA/matrixMult.asm] ===|
 |=== Checking: [examples/MA/multiply.asm] ===|
 |=== Checking: [examples/MA/negbranch.asm] ===|
 |=== Checking: [examples/MA/powers.asm] ===|
 |=== Checking: [examples/MA/vectorDiv.asm] ===|
 |=== Checking: [examples/MA/vectorSub.asm] ===|
 === 28/28 Tests passed ===

mips-assembler's People

Contributors

cosmicboots avatar

Watchers

 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.