#include #define MAXRAM 100 #define MAXAC 9999 #define CINCPROMPT ">" #define VERSION "2.1.3" #define TRUE 1 #define FALSE 0 FILE *tty; struct cardiac_s { unsigned int running; /* TRUE or FALSE to indicate running or not */ unsigned int dump; /* TRUE or FALSE to do dumps in each cycle */ FILE * IN; /* Input device for Cardiac */ FILE * OUT; /* Output device for Cardiac */ unsigned int pc; /* program counter */ int ac; /* acumulator */ int ac_sign; /* accumulator sign */ /* The next two fields combined make up the instruction register */ unsigned int opcode; /* opcode used in conjunction with address field */ unsigned int address; /* operand (usually an address) in the instr. reg */ int ram[MAXRAM]; /* Memory cells */ };