コード例 #1
0
        public int GetRelativeAddress(Machine machine, Instruction instruction)
        {
            var relatedMemory = instruction.AddressInt();

            if (instruction.Index_Flag != "00")
            {
                relatedMemory += machine.registers[instruction.Index_FlagInt() - 1].Value;
            }
            return(relatedMemory);
        }
コード例 #2
0
 public override void Invoke(Machine machine, Instruction instruction)
 {
     if (machine.acc.HexValue > 0)
     {
         machine.memory.BufferIndex = new Hex(instruction.AddressInt());
     }
     else
     {
         machine.memory.IncrementBuffer();
     }
 }
コード例 #3
0
        public override void Invoke(Machine machine, Instruction instruction)
        {
            var relativeAddress = instruction.AddressInt();

            if (instruction.Index_Flag != "00")
            {
                relativeAddress += machine.registers[instruction.Index_FlagInt() - 1].Value;
            }

            machine.memory.SetAddress(relativeAddress, machine.acc.HexValue.ToString());
            machine.memory.IncrementBuffer();
        }
コード例 #4
0
 public override void Invoke(Machine machine, Instruction instruction)
 {
     machine.registers[instruction.Index_FlagInt() - 1].SetValue(machine.memory.GetAddress(instruction.AddressInt()));
     machine.memory.IncrementBuffer();
 }
コード例 #5
0
 public override void Invoke(Machine machine, Instruction instruction)
 {
     machine.memory.BufferIndex = new Hex(instruction.AddressInt());
 }