Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void StoreData(int Memory_Location) {
- char temp_data[5]; // temporary array for data to write to memory
- snprintf(temp_data, 5, "%04d", ACC); // store accumulator into temporary character array
- for (int i = 0; i < 4; i++) { // move characters into memory
- if (i == 0 || i == 1) memory[Memory_Location][i] = 'Z';
- memory[Memory_Location][i+2] = temp_data[i];
- }
- if (Memory_Location > (program_line_count - 1)) new_data_count++; // increment if new line of memory
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement