Files
fz-lang/include/common/fzl_opcodes.h
T

21 lines
674 B
C

#ifndef FZL_OPCODES_H
#define FZL_OPCODES_H
// Available opcodes
typedef enum
{
FZL_OPCODE_LOADCONST, // Load const into T (temp) reg
FZL_OPCODE_CALL_BUILTIN, // Call builtin function
FZL_OPCODE_PUSHNUM, // Push number into stack
FZL_OPCODE_ADD, // Sum two numbers in arg strack
FZL_OPCODE_SUB, // Subract two numbers in arg stack
FZL_OPCODE_MUL, // Multiply two numbers in arg stack
FZL_OPCODE_DIV, // Divide two numbers in arg stack
FZL_OPCODE_POW, // Power first number in arg stack by second
FZL_OPCODE_MOD, // Get module of two numbers in arg stack
FZL_OPCODE_NEG, // Negotiate number in arg stack
} fzl_opcode_t;
#endif // FZL_OPCODES_H