The code as implemented looks at the current E flag in order to decide whether it is doing a fast or slow interrupt return. The processor pops cc then looks at E to decide what the rest of the frame is.
So it should be something like
/* rti */
case 0x3b:
reg_cc = pull8(sp);
cycles += 1;
if (get_cc (FLAG_E)) {
inst_pul (0xfe, ®_s, ®_u, &cycles);
} else {
inst_pul (0x80, ®_s, ®_u, &cycles);
}
cycles += 3;
break;
Found because I've been using the e6809 code for another project and hit a case where it mattered.
The code as implemented looks at the current E flag in order to decide whether it is doing a fast or slow interrupt return. The processor pops cc then looks at E to decide what the rest of the frame is.
So it should be something like
Found because I've been using the e6809 code for another project and hit a case where it mattered.