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
- 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
- 8-bit CPU
- 4 general purpose registers
- 256 bytes of memory
- Console output
Make sure you have Grunt installed to compile the asmsimulator.js
script.
Run grunt
to build the project.
A technical introduction is available on my blog: www.mschweighauser.com.
I use this repository as exercise for make me fit of open source projects.