{
suspend();
}
if ((addr&0x3)!=0)
{
throw new MemoryAccessException();
}
if ((addr>=getIO())&&(addr<getIO()+IOSIZE))
{
ioWrite(addr, val);
} else if ((addr>=0)&&(addr<=memory.length*4))
{
memory[addr/4]=val;
validMemory[addr/4]=true;
} else
{
throw new MemoryAccessException();
}
}