50 lines
716 B
C
50 lines
716 B
C
#pragma once
|
|
|
|
enum OPS {
|
|
OP_NOP = 0,
|
|
OP_PUSH,
|
|
OP_POP,
|
|
OP_DUP,
|
|
OP_SWAP,
|
|
|
|
OP_LOAD,
|
|
OP_STORE,
|
|
|
|
OP_JMP,
|
|
OP_JNT,
|
|
OP_JTR,
|
|
OP_RET,
|
|
OP_CALL,
|
|
OP_CALLEX, // AFEGIT PER A JAILSCRIPT
|
|
|
|
OP_ADD,
|
|
OP_SUB,
|
|
OP_MUL,
|
|
OP_DIV,
|
|
OP_MOD,
|
|
OP_AND,
|
|
OP_OR,
|
|
OP_NOT,
|
|
OP_NEG,
|
|
OP_INC,
|
|
OP_DEC,
|
|
OP_CONCAT,
|
|
|
|
OP_EQ,
|
|
OP_NEQ,
|
|
OP_LT,
|
|
OP_GT,
|
|
OP_LEQ,
|
|
OP_GEQ,
|
|
|
|
OP_SLEEP,
|
|
};
|
|
|
|
void parser_parse(const char* buffer, unsigned char* mem);
|
|
//const int parser_get_codesize();
|
|
//const int parser_get_memory_usage();
|
|
//unsigned short* parser_get_lines();
|
|
|
|
//void parser_register_external_function(const char* name, const char* parameters, void (*fun)(void));
|
|
|
|
//void parser_register_constant(const char* name, const unsigned char value);
|