/** SLDACC_PRINT This function prints all registers and control isgnals of the processor. */ void print(boolean header) { AccMicroinstr m = (AccMicroinstr) controller.getCurrentMicroinstruction(); if (header) { System.out.printf("# "); } else { System.out.printf(" "); } if (header) { System.out.printf("clk "); } else { System.out.printf("%s ", "^^\\__/"); } if (header) { System.out.printf("state "); } else { System.out.printf("[%4d] ", controller.getState()); } if (header) { System.out.printf("PC "); } else { System.out.printf("%04X ", PC.getQ()); } if (header) { System.out.printf("A "); } else { System.out.printf("%04X ", A.getQ()); } if (header) { System.out.printf("IR "); } else { System.out.printf("%04X ", IR.getQ()); } if (header) { System.out.printf("PSW "); } else { System.out.printf("%04X ", psw.output()); } if (header) { System.out.printf("PSW "); } else { System.out.printf("%5s ", psw.getFlagsAsString()); } if (header) { System.out.printf("AB "); } else { System.out.printf("%04X ", ab); } if (header) { System.out.printf("DB "); } else { System.out.printf("%04X ", db); } if (header) { System.out.printf("ALUO "); } else { System.out.printf("%04X ", aluo); } if (header) { System.out.printf("aluop "); } else { System.out.printf("%-5s ", m.aluop.toString()); } if (header) { System.out.printf("src1s "); } else { System.out.printf("%1d ", m.src1s); } if (header) { System.out.printf("src2s "); } else { System.out.printf("%1d ", m.src2s); } if (header) { System.out.printf("k "); } else { System.out.printf("%04X ", m.k); } if (header) { System.out.printf("moe "); } else { System.out.printf("%d ", (m.moe) ? 1 : 0); } if (header) { System.out.printf("mwr "); } else { System.out.printf("%d ", (m.mwr) ? 1 : 0); } if (header) { System.out.printf("doe "); } else { System.out.printf("%d ", (m.doe) ? 1 : 0); } if (header) { System.out.printf("aoe "); } else { System.out.printf("%d ", (m.aoe) ? 1 : 0); } if (header) { System.out.printf("asel "); } else { System.out.printf("%d ", m.asel); } if (header) { System.out.printf("aw "); } else { System.out.printf("%d ", (m.aw) ? 1 : 0); } if (header) { System.out.printf("pcw "); } else { System.out.printf("%d ", (m.pcw) ? 1 : 0); } if (header) { System.out.printf("irw "); } else { System.out.printf("%d ", (m.irw) ? 1 : 0); } if (header) { System.out.printf("psww "); } else { System.out.printf("%d ", (m.psww) ? 1 : 0); } if (header) { System.out.printf("pswsel "); } else { System.out.printf("%d ", m.pswsel); } System.out.println(); }