/***************************************************************************/
/*                            DATAPATH SIMULATOR                           */
/*                                                                         */
/*                              By Emily Ezust                             */
/*                                   1993				   */
/*                                                                         */
/*                 Based on Andrew Tanenbaum's hypothetical                */
/*                   Complex Instruction Set Computer                      */
/*                                                                         */
/*                                                                         */
/***************************************************************************/

/***************************************************************/
/*                                                             */
/* Copyright (c) 1995 by Emily Ezust                           */
/*                                                             */
/* This software is hereby licensed for non-commercial use     */
/* only.  It may be freely distributed but it may not be used  */
/* for monetary profit.  Commercial use of this software is    */
/* not permitted without an explicit written agreement with    */
/* the author.                                                 */
/*                                                             */
/***************************************************************/


#define YES 1
#define NO 2

/* main window size */
#define MAIN_HEIGHT 860
#define MAIN_WIDTH 800

#define MICRO 11
#define MACRO 111

/* displaying */
#define MCP 1
#define RAM 0
#define PROG 2
#define REGS 1

/* screens */
#define DP 0
#define EDITOR 1
#define MENU 2
#define DISPLAY 3

#define DEFAULT_SP 500

#define NUM_CODES 23
#define CONTROL_STORE_SIZE 256

/* MAR is 12 bits wide so the biggest RAM location is 111111111111 */
#define RAM_SIZE 4095
#define INST_LENGTH 13
#define BITS_IN_INST 32
#define NUM_DATA_POINTS 18
#define SCRATCH_LENGTH 17

/* indices for components of microprogram word */
#define AMUX_IND 0
#define COND_IND 1
#define ALU_IND 2
#define SH_IND 3
#define MBR_IND 4
#define MAR_IND 5
#define RD_IND 6
#define WR_IND 7
#define ENC_IND 8
#define C_BUS_IND 9
#define B_BUS_IND 10
#define A_BUS_IND 11
#define ADDR_IND 12
/* indices for scratchpad work */
#define PC 0
#define AC 1
#define SP 2
#define IR 3
#define TIR 4
#define ZERO 5
#define ONE 6
#define NEG_ONE 7
#define AMASK 8
#define SMASK 9
#define A_REG 10
#define MAR 11
#define MBR 12
#define ALU_A 13
#define ALU_B 14
#define ALU 15
#define SHIFTER 16

/* size of micro-program array */
#define MCP_SIZE 80

/*indices for on-screen information (registers, etc.) 
PC through MBR are recycled. */

#define SCREEN_MIR 13
#define SCREEN_MPC 14
#define SCREEN_ALU_F 15
#define SCREEN_ALU_NZ 16
#define SCREEN_SHIFTER 17


#define MEMORY 99 

#define MAX_MICROCODE_SIZE 200
#define MAX_PSEUDOINST_LENGTH 80


