Exemple #1
0
/*
 *	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();
}
Exemple #2
0
/*
 *	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();
}
Exemple #3
0
/*
 *	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();
}
Exemple #4
0
/*
 *	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);
}
Exemple #5
0
/*
 *	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();
}
Exemple #6
0
/*
 *	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);
}