--- np2/i286x/i286x.cpp 2004/01/25 05:41:29 1.16 +++ np2/i286x/i286x.cpp 2004/01/29 09:41:50 1.19 @@ -90,7 +90,10 @@ void i286x_shut(void) { void i286x_setextsize(UINT32 size) { if (CPU_EXTMEMSIZE != size) { - _MFREE(CPU_EXTMEM); + if (CPU_EXTMEM) { + _MFREE(CPU_EXTMEM); + CPU_EXTMEM = NULL; + } if (size) { CPU_EXTMEM = (BYTE *)_MALLOC(size + 16, "EXTMEM"); if (CPU_EXTMEM == NULL) { @@ -2758,14 +2761,12 @@ I286 _popf(void) { // 9D: popf je irqcheck // fast_intr test ah, 2 je nextop - cmp pic.ext_irq, 0 - jne nextop - mov al, pic.pi[0].imr - mov ah, pic.pi[1].imr + mov al, pic.pi[0 * (type _PICITEM)].imr + mov ah, pic.pi[1 * (type _PICITEM)].imr not ax - test al, pic.pi[0].irr + test al, pic.pi[0 * (type _PICITEM)].irr jne irqcheck - test ah, pic.pi[1].irr + test ah, pic.pi[1 * (type _PICITEM)].irr jne irqcheck nextop: ret @@ -3656,7 +3657,6 @@ I286 _into(void) { // CE: into I286 _iret(void) { // CF: iret __asm { - call extirq_pop I286CLOCK(31) mov edi, SS_BASE movzx ebx, I286_SP @@ -3686,14 +3686,12 @@ I286 _iret(void) { // CF: iret jne irqcheck test I286_FLAG, I_FLAG je nextop - cmp pic.ext_irq, 0 - jne nextop - mov al, pic.pi[0].imr - mov ah, pic.pi[1].imr + mov al, pic.pi[0 * (type _PICITEM)].imr + mov ah, pic.pi[1 * (type _PICITEM)].imr not ax - test al, pic.pi[0].irr + test al, pic.pi[0 * (type _PICITEM)].irr jne irqcheck - test ah, pic.pi[1].irr + test ah, pic.pi[1 * (type _PICITEM)].irr jne irqcheck nextop: ret @@ -4270,14 +4268,12 @@ I286 _sti(void) { // FB: sti setne I286_TRAP jne nextopandexit // fast_intr - cmp pic.ext_irq, 0 - jne jmp_nextop - mov al, pic.pi[0].imr - mov ah, pic.pi[1].imr + mov al, pic.pi[0 * (type _PICITEM)].imr + mov ah, pic.pi[1 * (type _PICITEM)].imr not ax - test al, pic.pi[0].irr + test al, pic.pi[0 * (type _PICITEM)].irr jne nextopandexit - test ah, pic.pi[1].irr + test ah, pic.pi[1 * (type _PICITEM)].irr jne nextopandexit jmp_nextop: jmp i286op[ebp*4]