Esempio n. 1
0
void cmd_exe(char const line[512], Cpu& cpu){
	uInt count = 1;

	if (sscanf(line, ". %u", &count) == EOF && sscanf(line, ".") == EOF){
		COMMAND_SYNTAX();
		return;
	}

	cpu.execute(count);
};
Esempio n. 2
0
int main(int argc, char* argv[])
{
	std::string file = "input.txt";

	//int program[] = {
	//	PSH, 5,
	//	PSH, 6,
	//	ADD,
	//	POP,
	//	SET, A, 2,
	//	HLT
	//};

	//std::vector<int> p;

	Cpu c;
	c.execute(&parse(file)[0]);
}