Sacred Tongue ISA v0
Last updated: February 19, 2026 Status: Prototype ISA for STVM Phase-1
Scope
This is the bootstrap ISA for Sacred Tongue VM. It does not claim full 1,536 semantic ops yet. It defines a deterministic executable subset.
Opcode Space
- Tongues: 6 (
KO,CA,RU,AV,DR,UM) - Per-tongue opcode byte:
0..255 - Total addressable instruction heads:
6 * 256 = 1536 - Implemented in v0: 29 instructions
Instruction Encoding
Fixed-width 8-byte instruction:
byte 0: tongue_id (KO=0, CA=1, RU=2, AV=3, DR=4, UM=5)
byte 1: opcode (0..255)
byte 2: a (u8)
byte 3: b (u8)
byte 4..7: imm (i32 little-endian)
Container format (STV1):
offset 0..3: magic = "STV1"
offset 4..7: instruction_count (u32 LE)
offset 8.. : instruction stream (count * 8 bytes)
Register File
r0..r20(21 registers, integer semantics in v0)
Tongue Families (v0)
KO Control Flow
KO.NOP0x00KO.HALT0x01KO.JMP target0x02KO.JZ reg target0x03KO.JNZ reg target0x04KO.CALL target0x05KO.RET0x06KO.YIELD0x07
CA Arithmetic and Logic
CA.MOVI reg imm0x10CA.MOV dst src0x11CA.ADD dst src0x12CA.SUB dst src0x13CA.MUL dst src0x14CA.DIV dst src0x15CA.MOD dst src0x16CA.CMP lhs rhs0x17CA.AND dst src0x18CA.OR dst src0x19CA.XOR dst src0x1A
RU Memory
RU.LOAD reg addr0x20RU.STORE reg addr0x21
AV IPC and Syscalls
AV.SEND reg channel0x30AV.RECV reg channel0x31AV.SYSCALL id0x32
DR Validation
DR.ASSERT reg0x40DR.VERIFY reg0x41
UM Security Ops
UM.HASH reg0x50UM.REDACT reg0x51
Sacred Token Heads
Instruction heads can be authored as:
- mnemonic:
KO.JMP - sacred token form:
ko:<prefix>'<suffix>
stasm decodes sacred token heads using packages/sixtongues/sixtongues.py.
Example
Assembly:
start:
CA.MOVI r0 2
CA.MOVI r1 3
CA.ADD r0 r1
AV.SEND r0 1
KO.HALT
Build and run:
python scripts/stasm.py examples/stvm/hello_world.sta -o examples/stvm/hello_world.stv --listing
python scripts/stvm.py run examples/stvm/hello_world.stv
Out of Scope in v0
- Floating-point ops
- Vectorized PHDM register ops
- Privilege ring enforcement in interpreter core
- Syscall ABI and host HAL
- JIT/AOT backends