handle RTI/RTT
Some checks failed
Build / cmake-builds (push) Has been cancelled
Build / makefile (macos-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Has been cancelled
Build / makefile (macos-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Has been cancelled
Build / makefile (macos-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Has been cancelled
Build / makefile (macos-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Has been cancelled
Build / makefile (macos-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Has been cancelled
Build / makefile (macos-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Has been cancelled
Build / makefile (ubuntu-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Has been cancelled
Build / makefile (ubuntu-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Has been cancelled
Build / makefile (ubuntu-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Has been cancelled
Build / makefile (ubuntu-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Has been cancelled
Build / makefile (ubuntu-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Has been cancelled
Build / makefile (ubuntu-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Has been cancelled

This commit is contained in:
Folkert van Heusden 2025-04-16 07:46:35 +02:00
parent c54a66edeb
commit f0f4e5c3b8
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
2 changed files with 13 additions and 2 deletions

View file

@ -871,7 +871,7 @@ else {
Check for traps or interrupts. If trap, locate the vector and check
for stop condition. If interrupt, locate the vector.
*/
int show = 0;
while (reason == 0) {
int32 IR, srcspec, srcreg, dstspec, dstreg;
@ -1095,8 +1095,11 @@ while (reason == 0) {
break;
}
case 2: /* RTI */
// show = 1;
src = ReadW (SP | dsenable);
src2 = ReadW (((SP + 2) & 0177777) | dsenable);
// if (IR == 2)
// printf("> %06o %06o", src, src2);
STACKFILE[cm] = SP = (SP + 4) & 0177777;
oldrs = rs;
put_PSW (src2, (cm != MD_KER)); /* store PSW, prot */
@ -1109,11 +1112,14 @@ while (reason == 0) {
SP = STACKFILE[cm];
isenable = calc_is (cm);
dsenable = calc_ds (cm);
// printf("(%d)", trap_req);
trap_req = calc_ints (ipl, trap_req);
JMP_PC (src);
if (CPUT (HAS_RTT) && tbit && /* RTT impl? */
(IR == 000002))
setTRAP (TRAP_TRC); /* RTI immed trap */
// if (IR == 2)
// printf("| %06o %06o <%d|%d>", PC, get_PSW(), trap_req, TRAP_INT);
break;
case 7: /* MFPT */
if (CPUT (HAS_MFPT)) /* implemented? */
@ -2472,7 +2478,7 @@ while (reason == 0) {
else setTRAP (TRAP_ILL);
break; /* end case 017 */
} /* end switch op */
if (trap_req == 0)
if (trap_req == 0 || trap_req == 2048 /* RTI/RTT? */)
break;
} /* end main loop */
@ -2483,6 +2489,8 @@ for (i = 0; i < 6; i++)
REGFILE[i][rs] = R[i];
STACKFILE[cm] = SP;
saved_PC = PC & 0177777;
//if (show)
//printf("%06o %06o\n", saved_PC, PSW);
pcq_r->qptr = pcq_p; /* update pc q ptr */
set_r_display (rs, cm);
return reason;

View file

@ -540,6 +540,9 @@ void emit_misc_operations()
PSW = psw_val;
//if (instr == 2)
// printf("PSW=%06o, ", PSW);
json_t *obj = generate_test(&id, mem, 3, 1, NULL, 0);
if (obj)
json_array_append_new(out, obj);