dgtools is a complete toolkit for developing software for the Digirule
series (2A/2U
) of hardware by bradsprojects.
dgasm
.asm
text file with Digirule ASM and.dgb
binary file with compiled code ready for simulation by dgsim.py
..hex
file (in the case of 2U) to be downloaded to the board.dginspect
.dgb
binary file and produces a human readabledgsim
.dgb
binary file and produces:
.dgb
file that contains the final state of the memory space at the end ofThese tools work together to write, debug and simulate code for the Digirule 2 prior to transfering it to the actual hardware.
dgtools
also includes some "extras", such as:
.dsf
ASM plugin,dgui.py
) that can handle compilation/simulation in one stepdgform.py
), to pretty print source code.The most common workflow is to:
dgasm.py
to compile the binarydgsim.py
to run and debug the binarydgui
to perform both of the above in sequence)dginspect.py
to check a binary file, get/set values from the virtual machine or key the code in.virtualenv
pip install dgtools
> virtualenv -p python3.8 pyenv
> source pyenv/bin/activate
dgtools
:
pip install -e ./
(From within the dgtools/
directory that contains the setup.py
file)dgtools
scripts callable from any position in the filesystem, as long as thepyenv
virtual environment is activated.dgtools
further:
pip install -r requirements.txt
dgtools
documentation is up on ReadTheDocs and of course
in doc/
.
Practical examples of how to use dgtools
are available in
this introductory walkthrough.
Once you familiarise yourself with the tools and Digirule's ASM, you might want to move to
the advanced walkthrough or
check out other programming examples
in dg_asm_eamples/
.
The ASM toolchain along with the brainfuck and Super Stack! compilers is available online at https://www.dgrdo.org. For more information see this introduction on its functionality
Enjoy!
Athanasios Anastasiou