Code Monkey home page Code Monkey logo

m99's Introduction

Python M99

A M99 emulator written in Python. This emulator allows you to run M99 programs on your computer and to run them step by step while watching the registers and memory change in real time.

Usage

Command line

The python file M99.py is the main file of the emulator. It can be used as a module or as a standalone program and it allow to run the M99 but you can't see the registers and memory change in real time.

M99.py [-h] file

The file argument is the path to the M99 program to run.

The program will fail with code 1 if there is a syntax error or with code 2 if there is a runtime error.

Gui

The python file M99_gui.py is a standalone program that allow you to run the M99 and to see the registers and memory change in real time. In a graphical interface.

The gui is composed of 3 parts:

  • The registers
  • The memory
  • The controls buttons

Registers

The registers are displayed in a list. They are displayed in decimal.

Memory

The memory is displayed in a grid. You can't edit the memory for now but it will be possible in the future. Under the values, the ASM code is displayed if it is relevant and valid.

The stack pointer is represented by a light blue square and the program counter by a light green square.

Controls

There are 7 buttons:

Button Description Key binding
Load Load a M99 program from a file l
Jump Jump to a specific address j
Execute Execute the program until the end
Step Execute the next instruction Enter
Reset Reset the registers r
Clear Clear the memory c and Backspace
Quit Quit the program q

Dependencies

The emulator is written using python 3.11.15. Because it use the match statement, the minimum version of python required is 3.10.x.

The GUI is written using the tkinter module. It is in most of the case already installed with python but if it is not the case you can install it with the command :

pip install tkinter.

m99's People

Contributors

robotechnic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.