mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-20 22:25:11 +00:00
24 lines
420 B
C++
24 lines
420 B
C++
//
|
|
// Created by anonymus-raccoon on 1/23/20.
|
|
//
|
|
|
|
#include "AMemory.hpp"
|
|
|
|
namespace ComSquare::Memory
|
|
{
|
|
uint24_t AMemory::getRelativeAddress(uint24_t addr) const
|
|
{
|
|
return addr - this->_start;
|
|
}
|
|
|
|
void AMemory::setMemoryRegion(uint24_t start, uint24_t end)
|
|
{
|
|
this->_start = start;
|
|
this->_end = end;
|
|
}
|
|
|
|
bool AMemory::hasMemoryAt(uint24_t addr) const
|
|
{
|
|
return this->_start <= addr && addr <= this->_end;
|
|
}
|
|
} |