Exemplo n.º 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);
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
        }
Exemplo n.º 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();
 }
Exemplo n.º 5
0
 public override void Invoke(Machine machine, Instruction instruction)
 {
     machine.memory.BufferIndex = new Hex(instruction.AddressInt());
 }