|
| Memory (int mSize, string name) |
|
int | Write (byte[] data, int addr=0) |
|
int | Write (Int16 data, int addr) |
|
int | Write (Int32 data, uint addr) |
|
Int32 | Read32 (Int32 addr) |
|
Int16 | Read16 (Int32 addr) |
|
override string | ToString () |
|
override void | Flush () |
|
override long | Seek (long offset, SeekOrigin origin) |
|
override void | SetLength (long value) |
|
override int | Read (byte[] buffer, int offset, int count) |
|
override void | Write (byte[] buffer, int offset, int count) |
|
◆ Memory()
Vcsos.Komponent.Memory.Memory |
( |
int |
mSize, |
|
|
string |
name |
|
) |
| |
51 m_pMemory =
new byte[mSize];
53 m_strAutor =
"Anna-Sophia Schröck";
56 this.
Write (Utils.RandMemory (mSize), 0, mSize);
58 Console.WriteLine (
"[VmSoC Komponente] {0} Craeted", name);
int Write(byte[] data, int addr=0)
Definition: Memory.cs:60
◆ Flush()
override void Vcsos.Komponent.Memory.Flush |
( |
| ) |
|
◆ Read()
override int Vcsos.Komponent.Memory.Read |
( |
byte [] |
buffer, |
|
|
int |
offset, |
|
|
int |
count |
|
) |
| |
139 int read = Math.Min (count,
Size);
141 for (
int i = offset; i < read; i++)
142 buffer [i] = m_pMemory [i];
int Size
Definition: Memory.cs:39
◆ Read16()
Int16 Vcsos.Komponent.Memory.Read16 |
( |
Int32 |
addr | ) |
|
94 byte[] _d = Int16.MinValue.ToBytes();
96 for (
int i = 0; i < _d.Length; i++)
97 _d [i] = m_pMemory [addr + i];
◆ Read32()
Int32 Vcsos.Komponent.Memory.Read32 |
( |
Int32 |
addr | ) |
|
85 byte[] _d = Int32.MinValue.ToBytes();
87 for (
int i = 0; i < _d.Length; i++)
88 _d [i] = m_pMemory [addr + i];
◆ Seek()
override long Vcsos.Komponent.Memory.Seek |
( |
long |
offset, |
|
|
SeekOrigin |
origin |
|
) |
| |
◆ SetLength()
override void Vcsos.Komponent.Memory.SetLength |
( |
long |
value | ) |
|
◆ ToString()
override string Vcsos.Komponent.Memory.ToString |
( |
| ) |
|
103 var output =
new StringWriter ();
106 output.WriteLine (m_strName +
":");
107 for (
int i = 0; i < m_pMemory.Length; i++) {
108 var b = m_pMemory [i];
109 var b1 = m_pMemory [++i];
111 if (address == 0 || address%16==0)
112 output.Write(
System.Environment.NewLine +
"[{0:X4}] ", address);
114 output.Write(
" {0:X2}{1:X2} ",(
int)b, (
int)b1);
117 return output.ToString ();
◆ Write() [1/4]
int Vcsos.Komponent.Memory.Write |
( |
byte [] |
data, |
|
|
int |
addr = 0 |
|
) |
| |
62 for (
int i = addr; i < data.Length; i++) {
63 m_pMemory [i] = data [i];
65 return addr + data.Length;
◆ Write() [2/4]
int Vcsos.Komponent.Memory.Write |
( |
Int16 |
data, |
|
|
int |
addr |
|
) |
| |
69 byte[] _d = data.ToBytes ();
70 for (uint i = 0; i < _d.Length; i++)
71 m_pMemory [addr + i] = _d [i];
73 return addr + _d.Length;
◆ Write() [3/4]
int Vcsos.Komponent.Memory.Write |
( |
Int32 |
data, |
|
|
uint |
addr |
|
) |
| |
77 byte[] _d = data.ToBytes ();
78 for (uint i = 0; i < _d.Length; i++)
79 m_pMemory [addr + i] = _d [i];
81 return (
int)(addr + _d.Length);
◆ Write() [4/4]
override void Vcsos.Komponent.Memory.Write |
( |
byte [] |
buffer, |
|
|
int |
offset, |
|
|
int |
count |
|
) |
| |
149 for (
int i = offset; i < count; i++)
150 m_pMemory [i] = buffer [i];
◆ Author
string Vcsos.Komponent.Memory.Author |
|
get |
◆ CanRead
override bool Vcsos.Komponent.Memory.CanRead |
|
get |
◆ CanSeek
override bool Vcsos.Komponent.Memory.CanSeek |
|
get |
◆ CanWrite
override bool Vcsos.Komponent.Memory.CanWrite |
|
get |
◆ Length
override long Vcsos.Komponent.Memory.Length |
|
get |
◆ Name
string Vcsos.Komponent.Memory.Name |
|
get |
◆ Position
override long Vcsos.Komponent.Memory.Position |
|
getset |
◆ Size
int Vcsos.Komponent.Memory.Size |
|
get |
◆ this[int adress]
byte Vcsos.Komponent.Memory.this[int adress] |
|
getset |
The documentation for this class was generated from the following file: