8086 Simulator and Emmulator Idea Vasic

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

Ok I am currently offline and since We don’t have time, I am writing this.

This
will sync when we go online.
Ok let me go straight to the business. A lot of the things we are not yet sure how
our system works. This is really bad because either we are afraid that we won’t be
able to do it or we haven’t researched more. I hope it’s the first one. So since we
have researched and somewhat got the basic idea of it. Here are the things we have
to explain:

Slide
I have already duplicated our kakhara slide and we will strategically replace fonts
and images there. We will base our slide using that. So let’s not think too hard
for that.
Apart from the flowcharts and diagrams for explanation the pictures that we need
are like: good assembly language mages, logos of the tech we use. Images of memory
chips. Consistent illustrations like :
unDraw you can change colors of those illustrations
illustrations.co
Above will be enough
Sometimes we may have to draw something to give it the feel of hand drawn
illustrations, excalidraw.com will help
Lastly icons and things like microprocessor chips.
A suitable font too.
Proposal
Ok let’s forget about slides for now. For the proposal, I’ll explain things
Read this paragraph very carefully. I will write whatever comes in my mind.
The most important thing to discuss is how our actual system works. Since we all
know that there are three main things to consider
We will use webassembly so we need to consider how Webassembly works. It’s a stack
based vm which is on top of the web browser.
We have plenty of diagrams and paragraphs that explains how the webassembly works.
So diagram is needed for this
We will use rust why?
It has many benefits of memory safety blah blah and works very well with web
assembly as a target compiler.
Frontend (this might look tough)
There are some questions like how will you show users how execution like in
sim8085.com
You can see the repo and get the idea but here are the most important things
Our completely frontend no backend code will be using reactive programming
framework like react.
Code execution highlighting:
We will use a codemirror. This will help us highlight things.
If we have to save state, we will use local storage API
There will be a single diagram to show the dataflow:
It will look something like:
Get assembly code using codemirrors API. -> feed that to the web assembly program
that we have written using rust and compiled —> get the execution state using it’s
api (giving data is inside the rust code). —> feed it to the frontend code written
in js.—> anything to store? Use local storage API. That’s it.

The elephant of the room now. How will our main program work?
Just found a very interesting video. Haven’t watched it yet. Do check it out:
https://youtu.be/vruq_3C5R94
Our main program is the one that is written in rust and compiled targeting
webassembly. (Please refer the web on how we will get the output data and bind it
to the reactive UI)
Implementing the vm
This was all we were researching about:
The summary of how it works till now. You can refer to the literature review here
How it works: lalit min correct me here hai.
We have the opcode map of the 8086 processor. We also know how each instruction
works. Instructions are 16 bit etc.. etc..
After getting the instruction, but wait. How will we get this?
Since we are using Webassembly, we will compile the .asm file as a whole. During
execution, we get the option to control execution steps using buttons and the steps
highlighting is done in the code box by getting which line is executing. Since I’m
explaining it in very short form it might not make sense but try explaining it by
looking at how sim8085 works.
Now about memory and the registers
Of course we will have structures in our code to hold the data. Since our UI is
reactive, the data gets updated automatically.
But actually the rust program itself is a library that will be compiled by
targeting rust-wasm.
That means we will have a separate command line assembler as well that is a rust
program. This is a necessity but it is not our final target. Our final application
will be a web application.
Concerns that BA sir had as well as critical to the project. This is actually what
will make our project unique.
IN OUT and other complex instructions.
To implement them, we will have to virtualize the external output devices too. But
for now we will have an option to bind the port address with some
variable/structure which in turn is bound with our UI.
Displacement and other commands
We will have to make a driver(library) that maps the virtual address of the
assembly code to our memory address table. Something like that. Literature review
is needed about how we can implement displacement in a vm. If nothing found maybe
we will have something new to publish.
Interrupts. Very complex. We will have to search a lot. If we can’t find any
literatures then we will keep it for extra features
software Development model.
We will use test-driven development. Writing tests and all
Model will be iterative.

Gantt chart
We have 120 days
First 3 weeks. Completely be comfortable with rust, webassembly and all the
instructions (exams)
Next 2 week. Make design.
Simultaneously write code for 1 month
Simultaneously improve code till day 80
Report
Dashain
Tihar
Mid term
So on use similar logic

You might also like