CrossAssembleur/tables.h
2021-05-12 19:50:59 +02:00

34 lines
1 KiB
C

#ifndef TABLE_H
#define TABLE_H
/*
----------------------------------------
| Adresse | Registre | Modifié |
----------------------------------------
| | | |
| | | |
| | | |
| i | 0x777756b8 | int |
| size | 0x777756b8 | int |
----------------------------------------
*/
#include <stdint.h>
#include <stdio.h>
enum instruction_t {NOP, ADD, MUL, SUB, DIV, INF, SUP, EQU, CPY, AFC, LOAD, STORE, LOADI, STOREI, STOREA, JMP, JMZ, PRI, GET, CALL, RET, STOP};
void init(void);
void print();
void increment_time();
int get_reg_read(int adresse, int * added_instruction);
int get_reg_write(int adresse, int * added_instruction);
int flush_and_init();
void new_instruction(int nb_inst);
void write_asm(FILE * file);
void write_code_machine(FILE * file);
void add_instruction(enum instruction_t inst, int param1, int param2, int param3);
#endif