rem: if( ( ReadLong( (ULONG) ed->exd_ReturnPC + 4 ) & ~0x1ffUL ) == (ULONG) pd->m_Intercepted )
context: PUHHandler( REG( a0, struct ExceptionData* ed ),            REG( a1, struct PUHData*       pd ),            REG( a6, struct Library*       MMUBase ) ){  struct ExecBase* SysBase;  int              rc = 1;  SysBase = ed->exd_SysBase;  if( ( (ULONG) ed->exd_FaultAddress & ~0x1ffUL ) != (ULONG) pd->m_Intercepted )  {    // Not for us!    return 1;  }  // Remove write-protection for us.  if( ! SetPageProperties( pd->m_SuperContext,                           MAPP_SINGLEPAGE | MAPP_REPAIRABLE,                           MAPP_INVALID | MAPP_SINGLEPAGE | MAPP_REPAIRABLE,                           (ULONG) pd->m_Intercepted, TAG_DONE ) )  {    // What to do?    return 1;  }  if( ed->exd_Flags & ( EXDF_INSTRUCTION |                         EXDF_WRITEDATAUNKNOWN |                         EXDF_MISALIGNED ) )  {    KPrintF( "Illegal flag(s): %08lx, address $%08lx\n",              ed->exd_Flags, (ULONG) ed->exd_FaultAddress );    rc = 1;  }  else  {     int    size;    ULONG  reg;    BOOL   handled;    size = (ULONG) ed->exd_NextFaultAddress - (ULONG) ed->exd_FaultAddress;    reg  = (ULONG) ed->exd_FaultAddress - (ULONG) pd->m_Intercepted;    handled = FALSE;    if( ed->exd_Flags & EXDF_WRITE )    {      ed->exd_Flags |= EXDF_WRITECOMPLETE;      if( size == 0 )      {        // Fake byte accesses, even though illegal        if( reg & 1 )        {          PUHWrite( reg & ~1UL, ed->exd_Data & 0x00ffUL, &handled, pd, SysBase );        }        else        {          PUHWrite( reg, ( ed->exd_Data << 8 ) & 0xff00UL, &handled, pd, SysBase );        }      }      else if( size == 1 )      {        PUHWrite( reg, ed->exd_Data & 0xffffUL, &handled, pd, SysBase );      }      else if( size == 3 )      {        PUHWrite( reg, ( ed->exd_Data >> 16 ) & 0xffffUL, &handled, pd, SysBase );        PUHWrite( reg + 2, ed->exd_Data & 0xffffUL, &handled, pd, SysBase );      }      else      {        KPrintF( "Illegal size: %ld", size );      }    }    else    {      ed->exd_Flags |= EXDF_READBACK;      if( size == 0 )      {        // Fake byte accesses, even though illegal                if( reg & 1 )        {          ed->exd_Data = PUHRead( reg & ~1UL, &handled, pd, SysBase ) & 0xffUL;        }        else        {          ed->exd_Data = PUHRead( reg, &handled, pd, SysBase ) >> 8;        }      }      else if( size == 1 )      {        ed->exd_Data = PUHRead( reg, &handled, pd, SysBase );      }      else if( size == 3 )      {        ed->exd_Data =  PUHRead( reg, &handled, pd, SysBase ) << 16;        ed->exd_Data |= PUHRead( reg + 2, &handled, pd, SysBase );      }      else      {        KPrintF( "Illegal size: %ld", size );      }    }#if 0    if( ! handled )    {      // Patch "misses" some so they won't bother us again      if( ( ReadLong( (ULONG) ed->exd_ReturnPC + 4 ) & ~0x1ffUL ) ==          (ULONG) pd->m_Intercepted )      {        KPrintF( "." );      }    }#endif    // Ok, we either emulated or simulated it;    rc = 0;  }  // Restore write-protection for us  SetPageProperties( pd->m_SuperContext,                     MAPP_INVALID | MAPP_SINGLEPAGE | MAPP_REPAIRABLE,                     MAPP_INVALID | MAPP_SINGLEPAGE | MAPP_REPAIRABLE,                     (ULONG) pd->m_Intercepted, TAG_DONE );  return rc;}