Using the App - ezasm-org/ezasm GitHub Wiki

Modes

There are three modes to run EzASM in, they are:

  • GUI Mode: Full editor and simulation experience, plenty of information about the state of the running program and stepwise execution.
  • CLI Interactive Mode: You can put in instructions one at a time and have them execute one at a time.
  • CLI File Mode: Run a file of EzASM code without the simulator GUI. Good for just running a file to see what it does, or testing correctness of an output without worrying about what's happening inside.

The GUI

The Editor

Front and center there is an editor for your code, it has syntax highlighting and will highlight each line as it happens when you run the simulator.

The Register Table

To the right you have a list of all the registers and their values. This table will update in real time as your program runs.

Toolbar

At the top of the main panel there is the toolbar, with buttons to control simulation.

  • Start - start the simulation of your program.
  • Stop - stop the simulation of your program. Registers will not reset when you hit stop (but they will reset if you then hit start)
  • Pause - pause the simulation of your program if it is running.
  • Resume - pause the simulation of your program if it is paused.
  • Step - execute the next instruction in your program if it is paused.
  • Reset - stop the execution of your program if it is running or paused, reset all registers to their default values.

Launch options

Version

Denoted with -v or --version, this option prints the program version and does not start the program.

Memory Size

Denoted with -m or --memory, this option allows you choose how much space the stack and heap each have.

Word Size

Denoted with -s or --word-size, this option allows you to decide how many bytes are in a word. The possible values are 4 and 8. It is 4 by default.

Windowless

Denoted with -w or --windowless, this option will launch the app in CLI mode. If you don't define a source file it will launch in CLI Interactive mode.

Source File

Denoted with -f or --file, this option sets the source file for CLI mode.

Input File

Denoted with -i or --input, this option sets a file to use instead of the standard input stream for CLI mode. All read instructions will read from the file you specify. If you read past the end of the file you will get an error.

Output File

Denoted with -o or --output, this option sets or creates a file to write to instead of the standard output stream for CLI mode. All print instructions will write to the file you specify, creating it if necessary and overwriting it if it already exists.