void print_alu(char *rega, char *regb, char * accumulator, char flags[]) {
    printf("Register A:   ");
    print_reg(rega);

    printf("Register B:   ");
    print_reg(regb);

    printf("Accumulator:  ");
    print_reg(accumulator);

    printf("Carryflag:    %c\n", getCarryflag(flags));
    printf("Signflag:     %c\n", getSignflag(flags));
    printf("Zeroflag:     %c\n", getZeroflag(flags));
    printf("Overflowflag: %c\n", getOverflowflag(flags));
    printf("***********************\n");
}
Exemple #2
0
void mon_print_registers(){
  printw(" PC  AC XR YR SP NV-BDIZC IR \n");
  printw("%02x%02x %02x %02x %02x %02x %c%c%c%c%c%c%c%c %02x \n",
		 conv_bitstr2int(pch,0,7),
		 conv_bitstr2int(pcl,0,7),
		 conv_bitstr2int(acc,0,7),
		 conv_bitstr2int(idx,0,7),
		 conv_bitstr2int(idy,0,7),
		 conv_bitstr2int(sp,0,7),

		 getSignflag(flags),
		 getOverflowflag(flags),
		 '1',
		 getBRKflag(flags),
		 getDflag(flags),
		 getIRQflag(flags),
		 getZeroflag(flags),
		 getCarryflag(flags),  
		 
		 conv_bitstr2int(ir,0,7));
}