Skip to content

Instantly share code, notes, and snippets.

@Nyrox
Created December 14, 2018 16:08
Show Gist options
  • Save Nyrox/99053f016b887c0de95e54ff60bb906d to your computer and use it in GitHub Desktop.
Save Nyrox/99053f016b887c0de95e54ff60bb906d to your computer and use it in GitHub Desktop.
Constant buffer:
[6, 20, 20, 12, 0, 2, 0]
Variable Slots:
{}
Instruction block:
main
CONST_I32(0)
CALL double
CONST_I32(1)
LESS_I32
COND_JMP jmp_-22177_else
CONST_I32(2)
CALL double
PRINT(INTEGER_32)
PUSH_VOID
jmp_-22177_else
POP_STACK
CONST_I32(3)
CALL double
PRINT(INTEGER_32)
CONST_I32(4)
RETURN
double
VAR_ASSIGN(0)
VAR_LOOKUP(0)
CONST_I32(5)
MUL_I32
VAR_ASSIGN(1)
VAR_LOOKUP(1)
POP_STACK
debug_print
VAR_ASSIGN(0)
VAR_LOOKUP(0)
PRINT(INTEGER_32)
CONST_I32(6)
RETURN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment