private static IProgcomCPU CreateCPU() { IProgcomCPU cpu = ProgcomSupport.CreateCPU(); cpu.Memory[41] = 1024; // vector precision cpu.Memory[43] = 16; // speed precision return(cpu); }
public ProgcomUnit(ISignalProcessor s) { mSignalProcessor = s; mCPU = CreateCPU(); mAssembler = CreateAssembler(); IO = new ProgcomIO(this, 32, null); }
public static IProgcomAssembler GetCompatibleAssembler(this IProgcomCPU cpu) { LoadTypes(); if (mAssemblerType == null) { throw new MissingReferenceException("Could not find ProgCom.Assembler2"); } object assembler = mCPUType.InvokeMember("getCompatibleAssembler", BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance, null, DuckTyping.Uncast(cpu), null); return(DuckTyping.Cast <IProgcomAssembler>(assembler)); }