Welcome to dgrdo/SuSt!

What?

You have reached the Super Stack! code compiler of dgrdo.

dgrdo is a simple online interface to dgtools, a complete toolchain for writing code for the Digirule 2 series of retro design computers.

The /sust section exposes the Super Stack! compiler through a very simple view that provides an editor for Super Stack!, a (read-only) view of the compiled Digirule Assembly code and the complete code trace. The trace shows the state of the CPU after executing each command.

This allows you to write Super Stack! programs that run on the Digirule without knowing any of its ASM instructions.

Το test and share Digirule ASM code directly, dgrdo also includes a typical section devoted to Assembly here.

How does it work?

  1. Use the top left editor to write Super Stack! code.
  2. Compile code by clicking "Go".
  3. When you are happy with the result, click on "Finalise and Share".
  4. Use the generated URL to share your Super Stack! project, download it and even allow others to extend it.

Projects stay live for 30 days from the day they were created (or extended).

...Super Stack!?

Super Stack! is a language with post-fix syntax and 26 commands that operate over a stack:

  • Any literal BYTE value (1,42,255, etc) is immediately pushed on to the stack.

  • Arithmetic & Logic Commands

    • add, sub, mul, div, mod, shl, shr
    • and, or, xor
    • All these commands expect two operands. For example, to do 5+3, enter 5 3 add.
  • Input / Output

    • output, outputascii
    • Send the top of the stack to the LEDs (output) or to the serial port (outputascii)
    • input, inputascii
    • Store a value from the keyboard (input) or the serial port (inputascii) to the top of the stack.
  • Stack commands

    • pop Discards the top of the stack
    • swap Swaps the top two values of the stack
    • cycle Stores the top of the stack to the bottom of the stack (the stack length remains the same)
    • rcycle The reverse of cycle.
    • dup Duplicates the top of the stack
    • rev Reverses the complete stack
  • Other commands

    • random Pops a value from the stack (u), produces a random number in the range 0..u-1
    • if / fi While the top of the stack is non-zero, keep executing the code block between if / fi
    • quit Terminates execution.
  • Comments are marked with #.

For more information about Super Stack! you might want to see here and here.

And definitely checkout Codegolf Stackexchange for even more interesting programs in Super Stack!.

...Digirule?

See here and here.

...dgtools?

For more information about dgtools, please see here and also check the ASM section of dgrdo.org and maybe its brainfuck compiler too that is also exposed via dgrdo.


Enjoy...

AA