Example #1
0
        /// <summary>
        /// Executes the current instruction on the program memory for a V2 decoder
        /// </summary>
        /// <param name="memory">Current program memory</param>
        /// <param name="bitmask">Current program bitmask</param>
        public void ExecuteV2(Dictionary <long, long> memory, ref Bitmask bitmask)
        {
            switch (this.operation)
            {
            case Opcode.MASK:
                bitmask = this.mask;
                break;

            case Opcode.MEM:
                bitmask.GetMaskedAddresses(this.address).ForEach(a => memory[a] = this.value);
                break;
            }
        }