1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-30 09:30:46 +00:00
r65emu/memory.cpp
2014-10-21 19:41:44 +01:00

23 lines
366 B
C++

#include "memory.h"
void Memory::put (Device &dev, address b) {
Device **d = _pages + b/page_size;
int size = dev.pages();
while (size--)
*d++ = &dev;
dev.base(b);
}
class NullDevice: public Memory::Device {
public:
NullDevice(): Memory::Device(65536) {}
void operator= (byte b) {}
operator byte() { return 0; }
} nd;
Memory::Memory() {
put(nd, 0);
}