public static void Movmm(Cpu cpu, uint rX, uint rY) { var vAddr = cpu.Registers[rY]; var value = cpu.Read(vAddr); vAddr = cpu.Registers[rX]; cpu.Write(vAddr, value); }
public static void Popm(Cpu cpu, uint rX) { var value = cpu.Pop(); var vAddr = cpu.Registers[rX]; cpu.Write(vAddr, value); }
public static void MapShared(Cpu cpu, uint rX, uint rY) { var vAddr = cpu.Registers[rX]; var count = cpu.Registers[rY]; while (--count > 0) { cpu.Write(vAddr, 0); vAddr += 4; } }
private static void WriteValue(Cpu cpu, OpCodeFlag flag, uint param, uint value) { switch (flag) { case OpCodeFlag.Register: cpu.Registers[param] = value; break; case OpCodeFlag.MemoryAddress: cpu.Write(cpu.Registers[param], value); break; default: throw new ArgumentOutOfRangeException(nameof(flag)); } }
public static void Movrm(Cpu cpu, uint rX, uint rY) { var vAddr = cpu.Registers[rX]; cpu.Write(vAddr, cpu.Registers[rY]); }