Skip to content

Simulator for LEG-V8 Assembly in Rust, as well as other tools for facilitating LEG-V8 development.

License

Notifications You must be signed in to change notification settings

anvitha305/legv8sim

Repository files navigation

legv8sim - A LEG-V8 Simulator and Additional Tools for Debugging/Editing

[The Simulator]

This is the legv8 assembly simulator for ECE 331 at UMass Amherst.

Minimum Requirements

Python 3 [the script installs the remaining requisite libraries] Do not use Homebrew to install Python3. Rust and Cargo [Rust's package manager. Install via rustlang website]

In order to install the simulator and use it, use the Source code option to download the directory needed to build the application on your computer. image

Once you unzip the source and navigate to its inner folder, run the following command with your terminal: sh run.sh

This will install the requirements for the simulator and run PyInstaller to create an executable.

Once the script is finished, you can run the application file in the dist folder within this inner folder [i.e. app.exe for Windows, app.app for MacOS], and this will let you run the application.

image

You can open files with the Open File option, and select a file with .s or .legv8 with valid LEGV8 assembly to run it. You can step or reset, and all the text entry fields let you add values for memory or registers in the respective views. Errors show up in the errors section on the simulator and deeper errors with the program go in the logfile that is in the dist directory after the app runs. You must hit return to confirm your edits to any registers or memory. Note that you need to enter arrays in manually for running code on arrays, with addressing done manually. A config file system is planned for next release.

Error Reporting

You can open an Issue on GitHub here and add screenshots of the simulator and logfiles or contact me at aramachandra[at]umass[dot]edu with this information if there's a deeper error with your code running with the simulator.

Check the legv8sim.tex file as an overview of the system's goals.

Not really a version of the simulator, but rather Sublime editor's highlighting syntax defined so that I can use a particular parsing library that got put into a package. Future verison(s) will include support for more code editors to have LEG-V8 syntax highlighting.

legv8 syntax highlighting in sublime

[demo of version 1.0's syntax highlighting]

Vim syntax highlighting, to make legv8sim editor-agnostic in terms of development so that you can edit the files on most of the common editors but you run it all on the same simulator. To view the source for this part of the project, go to the legv8-vim branch as they needed to be separated for reducing the bulk of the plugin.

image

[demo of version 1.1's syntax highlighting]

VSCode syntax highlighting brings another editor that is supported with the syntax highlighting grammar designed in this project. To view the source for this part of the project, go to the legv8-vscode branch. image

[demo of version 1.2's syntax highlighting]

Nano now supported! To view source, go to the legv8-nano branch. image [demo of version 1.3's syntax highlighting]

Libraries Used

References