Newer
Older
emul / emul_inst_exec.h
#ifndef EMUL_INST_EXEC__
#define EMUL_INST_EXEC__

#include "emul_inst_decipher.h"
#include "emul_inst_pseudo.h"
#include "emul_reg.h"
#include "emul_mem.h"
#include "emul_label.h"

// Exit code
typedef enum {
  Failed,
  Success,
  Stop,
  Exit
} exitcode_t;

// ランモード
typedef enum {
  Run,
  Step
} RUNMODE;

void emul_inst_exec_set_runmode(RUNMODE mode);
RUNMODE emul_inst_exec_get_runmode();

int emul_inst_exec_load(char *filename);

/* Execute Step
 * RETURN:
 *   seccsess: 1
 *   failed  : 0 */
exitcode_t emul_inst_exec_step();

/* Execute Run All
 * RETURN:
 *   seccsess: 1
 *   failed  : 0 */
exitcode_t emul_inst_exec_run();

#endif