Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 1.91 KB

README.md

File metadata and controls

67 lines (49 loc) · 1.91 KB

Simple 8-bit Assembler Simulator

A simulator which provides a simplified assembler syntax (based on NASM) and is simulating a x86 like cpu. Press Help inside the simulator to see an overview about the supported instructions.

This repository is a fork off Schweigi/assembler-simulator


Changes that I have done

  • Documented the code. Put in some comments.
  • In the example code I put a mention: You can also write in lowercase symbols
  • Changed the repository link (Fork me on GitHub) in the index.html to this repository.
  • Changed the README.md
  • Added a CONTRIBUTION.md file.
  • Changed the MIT-license.
  • Added a clear button for clearing the code-input-field.
  • I added new commands:
    • SQ (sq) : squares the content of the given register.
      mov a, 3
      sq a ; after that the register A contains 9
    • POW (pow) : computes the power x^n
      ; for example
      mov a, 2
      pow a, 3 ; after that the register A contains 8
    • MOD (mod) : computes the modulo a % b (a MOD b)
      ; for example
      mov a, 15
      mod a, 4 ; after that the register A contains 3

TRY IT


Features

  • 8-bit CPU
  • 4 general purpose registers
  • 256 bytes of memory
  • Console output

How to build

Make sure you have Grunt installed to compile the asmsimulator.js script. Run grunt to build the project.


Background

A technical introduction is available on my blog: www.mschweighauser.com.


Orginal author of this repository

Marco Schweighauser

I use this repository as exercise for make me fit of open source projects.