Skip to content

Installation and Usage

Michael Kamprath edited this page Apr 24, 2021 · 15 revisions

Requirements

bespokeasm requires Python 3.9 or greater.

Installation

To install, clone this repository and install using pip. Preferably, you have a python virtual environment set up when you do this.

git clone [email protected]:michaelkamprath/bespokeasm.git
pip install ./bespokeasm/

Usage

Once installed, assembly code can be compiled in this manner:

 bespokeasm compile -c isa-config.json awesome-code.asm

Supported options to the compile command are:

  • --config-file/-c - File path the JSON instruction set architecture configuration file. Can also be set with the BESPOKEASM_COMPILE_CONFIG_FILE environment variable.
  • --output-file/-o - File path to where the byte code binary image should be written. If note provided, it will default to the same file path as the input assembly file, with the file extension changed to .bin.
  • --pretty-print - When present, will emit a human readable version of the compilation.
  • --verbose/-v - Verbose output. Can be replicated for higher levels of verbosity, for example, -vvv will have a more verbose output than -v.

Note that supplying an instruction set configuration file is required via the -c/--config-file option.

Clone this wiki locally