Beispiel #1
0
 /// <summary>
 /// Gets or sets the <see cref="System.Byte"/> at the specified index.
 /// </summary>
 /// <value></value>
 /// <returns></returns>
 public byte this[uint index]
 {
     get
     {
         return(MemoryDispatch.Read8((uint)(_address + index)));
     }
     set
     {
         MemoryDispatch.Write8((uint)(_address + index), value);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Writes the specified index.
        /// </summary>
        /// <param name="index">The index.</param>
        /// <param name="value">The value.</param>
        /// <param name="count">The count.</param>
        public void Write32(uint index, uint value, byte count)
        {
            uint offset = _address + index;

            if (count == 1)
            {
                MemoryDispatch.Write8(offset, (byte)value);
                return;
            }

            while (count > 0)
            {
                MemoryDispatch.Write8(offset, (byte)(value & 0xFF));
                value = value >> 8;
                count--;
                offset++;
            }
        }
Beispiel #3
0
 /// <summary>
 /// Writes the specified index.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <param name="value">The value.</param>
 public void Write8(uint index, byte value)
 {
     MemoryDispatch.Write8((uint)(_address + index), value);
 }