1
0
mirror of https://github.com/prirun/p50em.git synced 2026-02-11 01:59:58 +00:00

Fix for problem where PASCAL install test crashes.

It appears that the emulator needs to check for faulted pointers
after indirection in APs used in e.g. EAFA.  PASCAL triggers this
issue by using EAFA on an indirect pointer to a DYNT.  A two cycle
fault check is done other places, and the approach is repeated here.
This commit is contained in:
Dennis Boone
2021-02-21 00:06:38 -05:00
parent 902f535120
commit af2b015383

5
em.c
View File

@@ -2352,7 +2352,7 @@ special:
static ea_t apea(unsigned short *bitarg) {
unsigned short ibr, ea_s, ea_w, bit, br, a;
unsigned int utempl;
ea_t ea, ip;
ea_t ea, ip, iwea;
eap = &gv.brp[RPBR];
utempl = get32(RP);
@@ -2378,8 +2378,11 @@ static ea_t apea(unsigned short *bitarg) {
bit = get16(INCVA(ea,2)) >> 12;
else
bit = 0;
iwea = ea;
ea = ip;
TRACE(T_EAAP, " After indirect, AP ea = %o/%o, bit=%d %s\n", ea>>16, ea & 0xFFFF, bit, searchloadmap(ea,' '));
if (ea & 0x80000000)
fault(POINTERFAULT, ea>>16, iwea); /* XXX: faddr=0? */
}
if (bitarg != NULL)
*bitarg = bit;