EightBit/LR35902/fusetest_LR35902/FuseMemoryDatum.cpp
Adrian.Conlon f0515ae65f First stab at a port of the fuse tests to LR35902.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-10 20:34:17 +01:00

20 lines
351 B
C++

#include "stdafx.h"
#include "FuseMemoryDatum.h"
void Fuse::MemoryDatum::read(std::ifstream& file) {
int begin;
file >> begin;
finish = (begin == -1);
if (finish)
return;
address = begin;
int byte;
bool completed = false;
do {
file >> byte;
completed = (byte == -1);
if (!completed)
bytes.push_back(byte);
} while (!completed);
}