XXIIVV

Gyo is a single-cycle Forth virtual machine.

This virtual machine was created as a result of experimenting with stack-effect checking and so was designed around the idea that each opcode is encoded with its own stack effect. The layout of the opcodes is inspired by Koopman's Stack Computer: The New Wave.

More details shortly.

15141312111098 76543210
1Literal
01Call
001Conditional Call
000 ALU WSDRSD IO(N,T)[T]=NR=TPC=R

Assembly

The programming of this computer is akin to writing Forth programs. At the assembly level, opcodes are made from various mnemonics:

ALUWSDRSDFlags
tTnNm[T]rR a+1e+1dIO(N,T)
&N&T^N^T|N|Ti1+T U-2V-2w[T]=N
=N==T>N>=T\N>>T/N<<T u-1v-1xR=T
+N+T-N-T ;PC=R