2 `INSN_RET,`INSN_RETCC: begin
6 address <= {registers[`REG_SPH],registers[`REG_SPL]};
8 1: begin // SPECIAL CASE: cycle does NOT increase linearly with ret!
9 `EXEC_INC_PC; // cycle 1 is skipped if we are not retcc
11 `INSN_cc_NZ: if (registers[`REG_F][7]) begin `EXEC_NEWCYCLE; end
12 `INSN_cc_Z: if (~registers[`REG_F][7]) begin `EXEC_NEWCYCLE; end
13 `INSN_cc_NC: if (registers[`REG_F][4]) begin `EXEC_NEWCYCLE; end
14 `INSN_cc_C: if (~registers[`REG_F][4]) begin `EXEC_NEWCYCLE; end
17 address <= {registers[`REG_SPH],registers[`REG_SPL]};
21 address <= {registers[`REG_SPH],registers[`REG_SPL]} + 1;
23 3: begin /* twiddle thumbs */ end
26 // do NOT increment PC!
33 `INSN_RET,`INSN_RETCC: begin
35 0: if (opcode[0]) // i.e., not RETCC
36 cycle <= 1; // Skip cycle 1; it gets incremented on the next round.
37 1: begin /* Nothing need happen here. */ end
38 2: registers[`REG_PCL] <= rdata;
39 3: registers[`REG_PCH] <= rdata;
41 {registers[`REG_SPH],registers[`REG_SPL]} <=
42 {registers[`REG_SPH],registers[`REG_SPL]} + 2;
43 if (opcode[4] && opcode[0]) /* RETI */