VolkanaDEV

Semantics

How the ops move values, and how they lower to the grid.

The stack

BloodCode is a stack machine. pulse and pulse_str push values; ops consume from the top and push their result. Arithmetic (combine, subtract, scale, divide) takes two, leaves one.

Organs and fields

grow_organ builds a structure with named fields; read_field and write_field move its state. On the grid, a field is a wire: writing it drives the wire, reading it senses the wire.

Control

route jumps unconditionally (the label is a junction). gate jumps when the top of the stack is false. dispatch calls a cell and pushes its return value.

Guards

checktype and checkret assert a value's type at a call boundary. On uncovered hardware they are the safety fence; on covered hardware they compile to nothing.