X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2FMemory.cpp;fp=src%2FMemory.cpp;h=0000000000000000000000000000000000000000;hb=4c305c73f8110d03b99cec045b3c5741867fd46b;hp=8570264bb8cc2b8bf2a08c8fbb68acff61c9f9dc;hpb=ec415e2315bfcf647e07febba35db4ef709b27d0;p=emu8051.git diff --git a/src/Memory.cpp b/src/Memory.cpp deleted file mode 100644 index 8570264..0000000 --- a/src/Memory.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "Memory.hpp" - -////////////////////////////////////////////////////////////////////////////// -// Memory::Memory( unsigned long MemSize ) -// Memory object constructor -////////////////////////////////////////////////////////////////////////////// -Memory::Memory( unsigned long MemSize ) -{ - memsize = MemSize; - memarray = new unsigned char[memsize]; -} - -////////////////////////////////////////////////////////////////////////////// -// Memory::~Memory( ) -// Memory object destructor -////////////////////////////////////////////////////////////////////////////// -Memory::~Memory( ) -{ - delete[] memarray; - memarray = 0; - memsize = 0; -} - -////////////////////////////////////////////////////////////////////////////// -// unsigned long Memory::GetSize( ) -// Get Memory size -////////////////////////////////////////////////////////////////////////////// -unsigned long Memory::GetSize( ) -{ - return memsize; -} - -////////////////////////////////////////////////////////////////////////////// -// void Memory::Write8( unsigned long Address, unsigned char Value ) -// Write 8-bit Value at Address into Memory -////////////////////////////////////////////////////////////////////////////// -void Memory::Write8( unsigned long Address, unsigned char Value ) -{ - if (Address >= memsize) return; - memarray[Address] = Value; -} - -////////////////////////////////////////////////////////////////////////////// -// unsigned char Memory::Read8( unsigned long Address ) -// Read 8-bit value at Address in Memory -////////////////////////////////////////////////////////////////////////////// -unsigned char Memory::Read8( unsigned long Address ) -{ - if (Address < memsize) { return memarray[Address]; } - return 0; -}