Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/roerohan/8086.js

A basic web-based 8086 emulator built with Javascript :rocket:
https://github.com/roerohan/8086.js

8086 8086-emulator assembly hacktoberfest hacktoberfest2020 hacktoberfest2021 javascript

Last synced: about 2 months ago
JSON representation

A basic web-based 8086 emulator built with Javascript :rocket:

Awesome Lists containing this project

README

        

[![Issues][issues-shield]][issues-url]

[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)





Logo


A basic web-based 8086 emulator built with Javascript.


Explore the docs ยป




View Demo
ยท
Report Bug
ยท
Request Feature

## Table of Contents

* [About the Project](#about-the-project)
* [Built With](#built-with)
* [Getting Started](#getting-started)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Usage](#usage)
* [Basic Workflow](#basic-workflow)
* [Roadmap](#roadmap)
* [Contributing](#contributing)
* [License](#license)
* [Contributors](#contributors-)

## About The Project

`8086.js` is a basic 8086 emulator built using Javascript, hosted at [https://roerohan.github.io/8086.js/](https://roerohan.github.io/8086.js/).

### Built With

* [React.js](https://arkdownreactjs.org/docs/getting-started.html)
* [Redux](https://redux.js.org/tutorials/essentials/part-1-overview-concepts)
* [Material UI](https://material-ui.com/getting-started/usage/)
* [Ace](https://github.com/ajaxorg/ace)

## Getting Started

To get a local copy up and running follow these simple steps.

### Prerequisites

You will need the following to be able to run the project.

* [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)
* [node (Node.js)](https://nodejs.org)

### Installation

1. Clone the Repo

```sh
git clone https://github.com/roerohan/8086.js.git
```

2. Install NPM packages using (npm or yarn)

### Using npm

```sh
npm install
```

### Using yarn

```
yarn install
```

**Note:** If installing the packages with `npm` you get errors use `yarn` to install them.

## Usage

> Note: `8086.js` does not support all instructions, pre-processor directives and interrupts yet. You can check out the supported instructions in the `switch-case` [here](./src/emulator/cpu/core.js).

To run the React App locally, you can run the following command.

1. Run the React App

### Using npm

```sh
npm start
```

### Using yarn

```sh
yarn start
```

## Basic Workflow

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.

1. An object of the [Emulator](./src/emulator/emulator.js) class is exported, which is the point of interaction between the frontend and the emulation logic.

2. First, the [lexer](./src/emulator/parser/lexer.js) divides the source code into tokens and sends them to a [parser](./src/emulator/parser/parser.js). The parser is responsible for extracting instructions from the tokens and converting them to a form that the `CPU` understands.

3. The [CPU](./src/emulator/cpu/core.js) 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 and `operands`. The CPU recognizes an instruction by it's `mnemonic`, such as `MOV` or `ADD`.

## Roadmap

See the [open issues](https://github.com/roerohan/8086.js/issues) for a list of proposed features (and known issues).

## Contributing

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

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

You are requested to follow the contribution guidelines specified in [CONTRIBUTING.md](./CONTRIBUTING.md) while contributing to the project :smile:.

## License

Distributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.

[roerohan-url]: https://roerohan.github.io
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=flat-square
[issues-url]: https://github.com/roerohan/8086.js/issues

## Contributors โœจ

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/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](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!