#include <stdio.h> #include "emul_inst_exec.h" #include "emul_io_std.h" #include "emul_opt.h" #include <stdio.h> #include <unistd.h> void event_fa(char *arg) { emul_inst_exec_load(arg); emul_reg_init(); emul_inst_exec_run(); emul_out_std("exit...\n"); getchar(); emul_std_end(); } int main(int argc, char *argv[]) { char c; emul_opt_event_fa(event_fa); if ( emul_opt(argc, argv) == 0 ) { printf("interrupt start? Y/n :"); c = fgetc(stdin); if ( c == 'n' || c == 'N' ) return 0; else { printf("ok\n"); } } }