Implementing register variables.

This commit is contained in:
Ruben Ayrapetyan
2014-07-24 18:13:32 +04:00
parent c837c7d435
commit b7a3a13bc9
13 changed files with 169 additions and 59 deletions
+12 -11
View File
@@ -26,17 +26,18 @@ main( int __unused argc,
char __unused **argv)
{
const OPCODE test_program[] = {
/* 0: */ getop_var_decl( 0),
/* 1: */ getop_var_decl( 1),
/* 2: */ getop_assignment( 0, OPCODE_ARG_TYPE_STRING, 1),
/* 3: */ getop_assignment( 1, OPCODE_ARG_TYPE_VARIABLE, 0),
/* 4: */ getop_is_true_jmp( 1, 6),
/* 5: */ getop_jmp_down( 5),
/* 6: */ getop_assignment( 0, OPCODE_ARG_TYPE_SMALLINT, 253),
/* 7: */ getop_assignment( 1, OPCODE_ARG_TYPE_NUMBER, 2),
/* 8: */ getop_is_false_jmp( 1, 10),
/* 9: */ getop_exitval( 0),
/* 10: */ getop_exitval( 1)
/* 0: */ getop_reg_var_decl( 255, 255),
/* 1: */ getop_var_decl( 0),
/* 2: */ getop_var_decl( 1),
/* 3: */ getop_assignment( 0, OPCODE_ARG_TYPE_STRING, 1),
/* 4: */ getop_assignment( 1, OPCODE_ARG_TYPE_VARIABLE, 0),
/* 5: */ getop_is_true_jmp( 1, 7),
/* 6: */ getop_jmp_down( 5),
/* 7: */ getop_assignment( 0, OPCODE_ARG_TYPE_SMALLINT, 253),
/* 8: */ getop_assignment( 1, OPCODE_ARG_TYPE_NUMBER, 2),
/* 9: */ getop_is_false_jmp( 1, 11),
/* 10: */ getop_exitval( 0),
/* 11: */ getop_exitval( 1)
};
mem_init();