private void Initialize() { mystream = new NetworkStream(listenersocket,true); myprocessor = new ASMProcessorRS(new GetMatrixFromFar(this.GetMatrixIntoMemory)); myprocessor.raiseerror = new RaiseError(this.SendError); myprocessor.currentcode.matrixmemory = new Matrix[matrixmemsize]; myprocessor.currentcode.matrixstate = new MatrixState[matrixmemsize]; myprocessor.currentcode.literals = new string[0]; myprocessor.currentcode.bus = this; memlist = new ArrayList(); mthread = new ProgramThread(); mthread.pstack = new double[RemoteMachine.threadstacksize,2]; }
public WrappedThreadObjectRS(ASMProcessorRS threadprocessor) { this.mthread = new ProgramThread(); this.mthread.pstack = new double[RemoteMachine.threadstacksize,2]; this.mthread.stackpointer = -1; this.threadprocessor = threadprocessor; }
public void Stop() { if(externaldevices !=null) { foreach(IExternalDevicePort tmp in externaldevices) tmp.ClosePort(); externaldevices = null; } if(!Object.ReferenceEquals(mystream,null)) { mystream.Close(); mystream = null; listenersocket = null; } else if(!Object.ReferenceEquals(listenersocket,null)){ listenersocket.Close(); listenersocket = null; } myprocessor =null; packet=null; memlist =null; mthread.pstack = null; }