Getting started
The Bit-Golf game on this site uses the base RV32I instruction set - which
means
no builtin multiplication or division or floating point arithmetic, etc. There are two special
system
call functions: INPUT and OUTPUT. INPUT RD takes the next value from the input queue and writes it
to
register RD. If the input queue is empty, -1 is written. OUTPUT RS halts execution, returning the
value
contained in RS.
> See the supported instruction set and VM features here <
One way to get started is to write your code in C, and compile it to RISC-V using
GodBolt. I recommend using the -O2 flag. Be aware that the RISC-V
VM only
supports memory access
from 0x00000000 to 0x000FFFFF - this is especially important if you don't use -O2, as the stack
pointer
will underflow.