#include"apple.h" void AppleOn(){ Memory = calloc(MEMORY_SIZE, sizeof(byte)); initInstructionTable(); } void AppleReset(){ acc = 0; X = 0; Y = 0; P = 0; S = 0; idata.cycles = 0; idata.length = 0; idata.add = 0; idata.value = 0; free(Memory); Memory = calloc(MEMORY_SIZE, sizeof(byte)); } byte getMemory(address x){ return Memory[x]; } void setMemory(address x, byte y){ Memory[x] = y; }