1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-06-01 07:41:57 +00:00
r65emu/prom.h
Stephen Crane d80a4b0da2 PROGMEM
2018-11-07 21:37:20 +00:00

16 lines
310 B
C++

#ifndef __PROM_H__
#define __PROM_H__
class prom: public Memory::Device {
public:
virtual void operator= (uint8_t) {}
virtual operator uint8_t () { return pgm_read_byte(_mem+_acc); }
prom(const uint8_t *mem, int uint8_ts): Memory::Device(uint8_ts), _mem(mem) {}
private:
const uint8_t *_mem;
};
#endif