From 9e8b57d6e6c5cee76af12bce27efb81041676314 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 6 Dec 2020 19:13:54 +0100 Subject: added testing framework (check) --- emu/emul.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'emu/emul.c') diff --git a/emu/emul.c b/emu/emul.c index 0399d33..4d2c3f1 100644 --- a/emu/emul.c +++ b/emu/emul.c @@ -74,6 +74,18 @@ void emul_start( emul_t *emul ) } } +static void print_help( void ) +{ + fprintf( stderr, "CPU is paused, press\n" + "(s) for single step\n" + "(f) fini (continue to next rts)\n" + "(c) for continue running\n" + "(b) break to single stepping\n" + "(+) speed up\n" + "(-) speed down\n" + "(q) or (ESC) for shutting down\n" ); +} + void emul_run( emul_t *emul, int nof_steps ) { #ifdef WITH_GUI @@ -82,13 +94,7 @@ void emul_run( emul_t *emul, int nof_steps ) bool done = false; if( emul->paused ) { - fprintf( stderr, "CPU is paused, press\n" - "(s) for single step\n" - "(c) for continue running\n" - "(b) break to single stepping\n" - "(+) speed up\n" - "(-) speed down\n" - "(q) or (ESC) for shutting down\n" ); + print_help( ); } while( !done ) { -- cgit v1.2.3-54-g00ecf