A basic web-based 8086 emulator built with Javascript.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
8086.js
is a basic 8086 emulator built using Javascript, hosted at https://roerohan.github.io/8086.js/.
To get a local copy up and running follow these simple steps.
You will need the following to be able to run the project.
- Clone the Repo
git clone https://github.com/roerohan/8086.js.git
- Install NPM packages using (npm or yarn)
npm install
yarn install
Note: If installing the packages with npm
you get errors use yarn
to install them.
Note:
8086.js
does not support all instructions, pre-processor directives and interrupts yet. You can check out the supported instructions in theswitch-case
here.
To run the React App locally, you can run the following command.
- Run the React App
npm start
yarn start
The UI is split into 2 major halves, the right half is the editor
and the left half is the emulator
. Instructions can be written in the editor, and when they are executed, the registers and memory in the emulator get updated accordingly. There are a few steps which happen in the background to make this possible.
-
An object of the Emulator class is exported, which is the point of interaction between the frontend and the emulation logic.
-
First, the lexer divides the source code into tokens and sends them to a parser. The parser is responsible for extracting instructions from the tokens and converting them to a form that the
CPU
understands. -
The CPU reads the mnemonic and the operands that were sent to it by the parser, and according to these values, it executes the instructions.
Note: The communication between the parser and the CPU is NOT in terms of
shellcode
, i.e,opcode
s andoperands
. The CPU recognizes an instruction by it'smnemonic
, such asMOV
orADD
.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
You are requested to follow the contribution guidelines specified in CONTRIBUTING.md while contributing to the project 😄.
Distributed under the MIT License. See LICENSE
for more information.
Thanks goes to these wonderful people (emoji key):
Rohan Mukherjee 💻 📖 |
Rishit Bansal 💻 📖 |
Ritika 💻 |
Rob Capellini 💻 |
Jose M. Segura Polanco 💻 |
Pranav P 💻 |
Namit Nathwani 💻 |
Sanjana Rai 📖 |
vikitor566 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!