Instruction Set
29 assigned slots with fixed numbers, fixed spellings, and fixed semantics. Once assigned, a slot never changes.
The assigned slots
| Slot | Op | Meaning |
|---|---|---|
| 0 | pulse | push a float onto the stack |
| 1 | pulse_str | push a string |
| 2 | sense | read a variable's value |
| 3 | hold | store a value into a variable |
| 4 | grow_organ | construct an organ (fields + methods) |
| 5 | read_field | read an organ field |
| 6 | write_field | write an organ field |
| 7 | grow_list | construct a list |
| 8 | probe | index into a list |
| 9 | combine | add |
| 10 | subtract | subtract |
| 11 | scale | multiply |
| 12 | divide | divide |
| 13 | signal | print / write to the screen |
| 14 | output | return a value / end a program |
| 16 | threshold_eq | equality test |
| 17 | threshold_ne | inequality test |
| 18 | threshold_lt | less-than |
| 19 | threshold_le | less-than-or-equal |
| 20 | threshold_gt | greater-than |
| 21 | threshold_ge | greater-than-or-equal |
| 22 | route | unconditional jump |
| 23 | gate | conditional branch |
| 24 | junction | block label / join point |
| 25 | dispatch | call a cell |
| 27 | builtin | host builtin (file, GPU, math) |
| 28 | implant | write into a list slot |
| 62 | checkret | return-type guard |
| 63 | checktype | argument-type guard |
Reserved forever
Slot 15 was the old Return, merged into Output. It is reserved permanently and will never be reused. Please don't try to assign a new op to it.
Slot 26 is reserved the same way: it was the old Ret, merged into Output.
The freeze
Five rules, enforced at compile time in the compiler's own source:
• Assigned slot numbers never change.
• New ops take unassigned slots only.
• Deprecated ops keep their tag and number forever.
• Alias spellings are part of the ABI (the serialized surface is load-bearing).
• Semantics never mutate; new behavior rides a new slot.
Changing an assigned slot's number or spelling fails the build. That is what makes BloodCode a contract instead of a convention.
System cells (4.0)
System cells didn't need any new instructions. Their operations are builtins, and the compiler turns them into the same 29, using the type after each cell's ->:
iadd isub imul idiv imod iand ior ixor ishl ishr ieq ine ilt ile igt ige ineg band bor bxor shl shr load8 load16 load32 load64 store8 store16 store32 store64 to_u64 to_i64
The freeze still holds, and the build still enforces it. All of this went in without adding or changing a single slot.