/* * Execute several steps with trace output */ void do_trace(char *s) { register int count, i; while (isspace((int)*s)) s++; if (*s == '\0') count = 20; else count = atoi(s); cpu_state = SINGLE_STEP; cpu_error = NONE; print_head(); print_reg(); for (i = 0; i < count; i++) { cpu(); print_reg(); if (cpu_error) { if (cpu_error == OPHALT) { if (!handel_break()) { break; } } else break; } } cpu_err_msg(); }
/* * Run the CPU emulation endless */ static void do_go(char *s) { while (isspace((int)*s)) s++; if (isxdigit((int)*s)) PC = exatoi(s); cont: cpu_state = CONTIN_RUN; cpu_error = NONE; switch(cpu) { case Z80: cpu_z80(); break; case I8080: cpu_8080(); break; } if (cpu_error == OPHALT) if (handel_break()) if (!cpu_error) goto cont; cpu_err_msg(); print_head(); print_reg(); }
/* * Run the CPU emulation endless */ void do_go(void) { cont: cpu_state = CONTIN_RUN; cpu_error = NONE; cpu(); if (cpu_error == OPHALT) if (handel_break()) if (!cpu_error) goto cont; cpu_err_msg(); print_head(); print_reg(); }
/* * Execute a single step */ void do_step(void) { BYTE *p; cpu_state = SINGLE_STEP; cpu_error = NONE; cpu(); if (cpu_error == OPHALT) handel_break(); cpu_err_msg(); print_head(); print_reg(); p = PC; disass(&p, p - ram); }
/* * Run the CPU emulation endless */ static void do_go(char *s) { while (isspace((int)*s)) s++; if (isxdigit((int)*s)) PC = ram + exatoi(s); cont: cpu_state = CONTIN_RUN; cpu_error = NONE; cpu(); if (cpu_error == OPHALT) if (handel_break()) if (!cpu_error) goto cont; cpu_err_msg(); print_head(); print_reg(); }
/* * Execute a single step */ static void do_step(void) { BYTE *p; cpu_state = SINGLE_STEP; cpu_error = NONE; switch(cpu) { case Z80: cpu_z80(); break; case I8080: cpu_8080(); break; } if (cpu_error == OPHALT) handel_break(); cpu_err_msg(); print_head(); print_reg(); p = mem_base() + PC; disass(&p, PC); }