// This function loads from DM to Register void ControlUnit::LW(int registerIndex, int dataIndex, DataMemory &da1, Register &r1, MainFrame* theFrame) { theFrame->OnDelay(1); string dataVal = da1.get(dataIndex); r1.storeCU(dataVal, registerIndex, theFrame); // Store in Register Index pc++; };