interpreteur.l et instructions.h
This commit is contained in:
parent
791facef81
commit
0fa10f44a9
2 changed files with 7 additions and 0 deletions
|
@ -16,6 +16,9 @@
|
||||||
#define AFCA 13
|
#define AFCA 13
|
||||||
#define WR 14
|
#define WR 14
|
||||||
#define READ 15
|
#define READ 15
|
||||||
|
#define RET 16
|
||||||
|
#define CALL 17
|
||||||
|
#define COPR 18
|
||||||
|
|
||||||
#define MAX_INSTRUCTIONS_SIZE 256
|
#define MAX_INSTRUCTIONS_SIZE 256
|
||||||
#define MAX_MEMORY_SIZE 256
|
#define MAX_MEMORY_SIZE 256
|
||||||
|
@ -24,6 +27,7 @@ void asm_init();
|
||||||
void asm_add_3(char ins, int arg1, int arg2, int arg3);
|
void asm_add_3(char ins, int arg1, int arg2, int arg3);
|
||||||
void asm_add_2(char ins, int arg1, int arg2);
|
void asm_add_2(char ins, int arg1, int arg2);
|
||||||
void asm_add_1(char ins, int arg1);
|
void asm_add_1(char ins, int arg1);
|
||||||
|
void asm_add_0(char ins);
|
||||||
void asm_run();
|
void asm_run();
|
||||||
|
|
||||||
#endif // #ifndef __INSTRUCTIONS_H__
|
#endif // #ifndef __INSTRUCTIONS_H__
|
||||||
|
|
|
@ -21,6 +21,9 @@ PRI {return tPRI;}
|
||||||
AFCA {return tAFCA;}
|
AFCA {return tAFCA;}
|
||||||
WR {return tWR;}
|
WR {return tWR;}
|
||||||
READ {return tREAD;}
|
READ {return tREAD;}
|
||||||
|
RET {return tRET;}
|
||||||
|
CALL {return tCALL;}
|
||||||
|
COPR {return tCOPR;}
|
||||||
|
|
||||||
-?[0-9]+ {
|
-?[0-9]+ {
|
||||||
yylval.nb = atoi(yytext);
|
yylval.nb = atoi(yytext);
|
||||||
|
|
Loading…
Reference in a new issue