Code Monkey home page Code Monkey logo

mmix's People

Contributors

barbarabutz avatar jaborn avatar karolineplum avatar teiesti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmix's Issues

Add an open-source license

It might be a little to early for that, but since we want to publish our software on crates.io in the end, we have to commit to an open-source license.

And since we are all authors, we have to find one together.

(I created this issue, so we won't forget!)
(Okay, I did also test issues with this issue...)

Add a main.rs

At the moment, our project is a library project. At the moment, the idea is that we have both, a library and a binary. How should that work?

Think about loading binaries

We MMIX works with binaries that store the data and text section. We have to think how these binaries should look like and how we load them.

Question 1: Should we use the file type specified by Donald Knuth? Or should we invent our own simpler format?

Correct array SYMBOLICS containing names of instructions

In PR #36 the constant array SYMBOLICS was added to machine/behavior/is/mod.rs which maps an opcode to a str specifying the instruction's name.
The pathnames should be removed and the instruction names should be in capital letters.

Example: "arithmetic::addi" -> "ADDI"

constructing and accessing ByteAt, WydeAt, TetraAt, OctaAt

We (obviously) need to construct these types and access their fields somehow. We could either declare their respective field public, or implement "constructor-methods" and get-/set-methods. Opinions?
@jaborn @KarolinePlum @teiesti

Edit: added implementation of ldb for clarification
currently, we can't access res.0, construct ByteAt(a), ....

`/// load byte
pub fn ldb(state: &mut State, x: u8, y: u8, z: u8) {

let op1: u64 = state.gpr[y].into();
let op2: u64 = state.gpr[z].into();
let a = op1.wrapping_add(op2);
let address = ByteAt(a);
let res = state.mem[address];
let max_val = u8::max_value();
if res.0 > max_val / 2 {
    let to_subtract = max_val - res.0;
    state.gpr[x] = Octa(u64::max_value() - (to_subtract as u64))
} else {
    state.gpr[x] = Octa(res.0 as u64);
}

}`

Implement the instruction set

  • arithmetic ( #26 ) merged
  • bitwise ( #24 ) merged
  • bytewise ( #29 ) merged
  • conditional ( #28 ) merged
  • control ( #39 ) merged
  • float ( #37 ) merged
  • immediate ( #32 ) merged
  • interrupt
  • memory ( #33 ) merged
  • other ( #38 ) merged
  • subroutine (work in progress)
  • system ( #41 ) merged

Add doc-comments

As the functions need doc-comments at the end I suggest to write them directly after the implementation. In this way we get a overview which functions still need to be implemented.

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.