31 lines
646 B
C
31 lines
646 B
C
#ifndef OPCODE_INFO_H
|
|
#define OPCODE_INFO_H
|
|
|
|
#include "types.h"
|
|
#include "string.h"
|
|
#include "opcode.h"
|
|
|
|
typedef struct opcode_info_t {
|
|
unsigned char code;
|
|
char type;
|
|
char name[OPCODE_NAME_LEN];
|
|
#if defined(PC)
|
|
char desc[OPCODE_DESC_LEN];
|
|
#endif
|
|
} opcode_info_t;
|
|
|
|
#define OPCODE_TYPE_NORMAL 0
|
|
#define OPCODE_TYPE_EXT 1
|
|
|
|
#define OPCODE_LIST_LEN OPCODE_COUNT+OPCODE_EXT_COUNT
|
|
|
|
int Opcode_init();
|
|
int Opcode_quit();
|
|
|
|
int Opcode_getOpByName(char* name, char type, opcode_info_t *op);
|
|
int Opcode_getOpByCode(unsigned char code, char type, opcode_info_t *op);
|
|
|
|
void Opcode_register(unsigned char code, char* name, char type, char* desc);
|
|
|
|
#endif
|