/***************************************************************************** * Change Log * Date | Change *-----------+----------------------------------------------------------------- * 16-Nov-85 | [1.42] Created * 24-Jan-86 | [1.324] Allow mode switch to be hit in outer border * 22-Feb-86 | [1.362] Added color * 30-Jul-86 | [1.403] Added log_console_event call * 18-Aug-86 | [1.414] screen.h -> bscreen.h * 10-Nov-91 | [1.428] converted to Microsoft C 6.0 *****************************************************************************/ /***************************************************************************** 1401 Emulator Mode Switch Module This module manipulates the 'mode' switch settings *****************************************************************************/ #include "stdio.h" #include "boolean.h" #include "btypes.h" #include "scdspmsg.h" #include "panel.h" #include "hercules.h" #include "disp.h" /* #include "graph.h" */ #include "diag.h" #include "display.h" #include "color.h" #include "1401.h" #include "button.h" #include "mode.h" mode_state modes[NMODES] = { /* S-X, S-Y, B-X, B-Y id code active */ /* --- --- --- --- ----------- ---- ------ */ { 0, 0, 0, 0, " Run ", mode_run, true}, { 0, 0, 0, 1, " Adr Stop", mode_adr_stop, false}, { 0, 0, 1, 0, " I/EX ", mode_i_ex, false}, { 0, 0, 1, 1, " Sing Cyc", mode_sing_cyc, false}, { 0, 0, 2, 0, " Stg Prnt", mode_stg_prt, false}, { 0, 0, 2, 1, " Char Dsp", mode_char_dsp, false}, { 0, 0, 3, 0, " Alter ", mode_alter, false} }; void show_mode(mode_state * M); /**************************************************************************** * show_mode * Inputs: * mode_state * M: Mode state to show * Effect: * Displays the mode on the screen according to its 'active' state ****************************************************************************/ void show_mode(mode_state * M) { mark_screen(M->X,M->Y,M->id,M->active); } /**************************************************************************** * clear_active_mode * Effect: * Clears the current active mode, and turns off its screen rep ****************************************************************************/ void clear_active_mode() { short i; for(i=0;i