Assembler/header/instruction_table.h

32 lines
787 B
C

#ifndef _INSTRUCTION_TABLE_H_
#define _INSTRUCTION_TABLE_H_
#include "../header/shash/shash.h"
#include <sys/types.h>
#include <stdint.h>
#define MAX_INSTRUCTION_COUNT 16
// Create a hashtable that contains informations about the instructions.
shash_hashtable_t create_instruction_information_hastable(void);
// Destroy the information table
void destroy_instruction_information_hashtable(shash_hashtable_t *instruction_information_table);
typedef struct
{
unsigned int requires_adress;
unsigned int supports_adress_label;
uint8_t opcode;
} instruction_information_t;
typedef struct
{
char *name;
unsigned int name_length;
unsigned int requires_adress;
unsigned int supports_adress_label;
uint8_t opcode;
} instruction_information_config_t;
#endif