Giter VIP home page Giter VIP logo

ce_cw's Introduction

CE_CW

Simple computer emulator with a limited instruction set. 16-bit address memory subsystem with 64-bit instruction format.
Computer Architecture:

  • 16-bit memory subsystem with 16-bit (65535) address
  • 64-bit instruction format
  • 17 different instructions
  • fetch/decode/execute cycle

Instruction set:

  • Arithmetic
  1. ADD Add value from memory to AC
  2. ADI Add immediate value to AC
  3. SUB Subtract value from memory from AC
  4. SBI Subtract immediate value from AC
  5. MUL Multiply value from memory with AC
  6. DIV Divide AC by value from memory
  7. REM Remainder of division of AC by value from memory
  • Data movement
  1. LDA Load accumulator from memory
  2. STA Store accumulator value to memory
  • Program flow control
  1. JMP Jump to target address
  2. BNE Branch to target address if operand 1 != operand 2
  3. BEQ Branch to target address if operand 1 == operand 2
  • Others
  1. SLT Set target address to 1 if operand 2 < operand 3
  2. SLI Set target address to 1 if operand 2 (immediate value) < operand 3 (immediate value)
  3. LET Set target address to 1 if operand 2 ≤ operand 3
  4. CLA Clear accumulator
  5. EOP End of program and stops the computer
  6. undefined When no instruction detected, move on to next instruction

Initial test programs:

  • Data movement testing (✓)
  • Arithmetic instruction testing (✓)
  • Program flow control + miscellaneous testing (✓)

Showcase programs:

  • calculates (and print out) the squares of all the integers between 0 and 99 (✓)
  • calculates (and print out) all the prime numbers between 1 and 1000 (✓)

ce_cw's People

Contributors

zckoh 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.