public static void StorePointer(Pointer address, long offset, Pointer value) { if (CPU.Is32Bit) { CPU.Write32((ulong)(address.ToInt64() + offset), (uint)value.ToInt64()); } else { CPU.Write64((ulong)(address.ToInt64() + offset), (ulong)value.ToInt64()); } }
public static void Store64(Pointer address, Pointer value) { if (CPU.Is32Bit) { CPU.Write64((ulong)address.ToInt64(), (uint)value.ToInt64()); } else { CPU.Write64((ulong)address.ToInt64(), (ulong)value.ToInt64()); } }
public long GetOffset(Pointer b) { return(b.ToInt64() - ToInt64()); }
public static ulong Load64(Pointer address, int offset) { return(CPU.Read64((ulong)(address.ToInt64() + offset))); }
public static ulong Load64(Pointer address) { return(CPU.Read64((ulong)address.ToInt64())); }
public static uint Load32(Pointer address, uint offset) { return(CPU.Read32((ulong)(address.ToInt64() + offset))); }
public static void Store(Pointer address, uint offset, long value) { CPU.Write64((ulong)(address.ToInt64() + offset), (ulong)value); }
public static void Store(Pointer address, int offset, int value) { CPU.Write32((ulong)(address.ToInt64() + offset), (uint)value); }
public static void Store(Pointer address, long value) { CPU.Write64((ulong)address.ToInt64(), (ulong)value); }
public static ushort Load16(Pointer address) { return(CPU.Read16((ulong)address.ToInt64())); }
public static void Store(Pointer address, uint value) { CPU.Write32((ulong)address.ToInt64(), value); }
public static void Store(Pointer address, short value) { CPU.Write16((ulong)address.ToInt64(), (ushort)value); }
public static void Store(Pointer address, sbyte value) { CPU.Write8((ulong)address.ToInt64(), (byte)value); }
public static void Store16(Pointer address, uint offset, ushort value) { CPU.Write16((ulong)(address.ToInt64() + offset), value); }
public static void Store8(Pointer address, uint offset, byte value) { CPU.Write8((ulong)(address.ToInt64() + offset), value); }
public static byte Load8(Pointer address) { return(CPU.Read8((ulong)address.ToInt64())); }