Beispiel #1
0
        public bool Initialize(ExecuteSetupData.MemoryContent content)
        {
            this.Words = new WordElement[content.WordCapacity];

            if (this.Words.Length < content.WordCapacity)
            {
                MessageManager.ShowLine($"RAM: words capacity is too small for loading setup data.", enumMessageLevel.ProgressLog);
                return(false);
            }

            for (int i = 0; i < content.Words.Count; i++)
            {
                this.Words[i] = new WordElement()
                {
                    Content        = content.Words[i].InitialValue,
                    DebugInfoCount = content.Words[i].DebugInfoCount
                };

                this.Words[i].DebugInfos.Element0 = DebugInfoElement.ConvertFrom(content.Words[i].DebugInfos.Element0);
                this.Words[i].DebugInfos.Element1 = DebugInfoElement.ConvertFrom(content.Words[i].DebugInfos.Element1);
                this.Words[i].DebugInfos.Element2 = DebugInfoElement.ConvertFrom(content.Words[i].DebugInfos.Element2);
                this.Words[i].DebugInfos.Element3 = DebugInfoElement.ConvertFrom(content.Words[i].DebugInfos.Element3);
            }

            return(true);
        }