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); }
public override void Invoke(Machine machine, Instruction instruction) { if (machine.acc.HexValue > 0) { machine.memory.BufferIndex = new Hex(instruction.AddressInt()); } else { machine.memory.IncrementBuffer(); } }
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(); }
public override void Invoke(Machine machine, Instruction instruction) { machine.registers[instruction.Index_FlagInt() - 1].SetValue(machine.memory.GetAddress(instruction.AddressInt())); machine.memory.IncrementBuffer(); }
public override void Invoke(Machine machine, Instruction instruction) { machine.memory.BufferIndex = new Hex(instruction.AddressInt()); }