static void SPCMacro (RG2ROM program, String destination)
		throws IllegalArgumentException
	{
		int length = program.command.length;  //May or may not fit in the available 60 lines of space.
		final int x_base = 127;
		final int y_base = 98;  //97.5 teleports into the ground below the torches.
		final int z_base = -21;
		int X;
		int Y;
		int Z;
		int updatesDone = 0;  //Tracks number of changes made by the macro.  The user must undo
		//This many things to have the effect of removing the program.
		
		char bin;
		String unlit_torch = "121.5 58 73.5"; //57.5 drops you into the ground, below the torch.
		String newLine = Settings.newLine;  //Write doesn't include a newline.  So these
		//Are placed manually to separate commands.
		
		try
		{
			FileWriter macro = new FileWriter (destination + ".txt");
			// /t [X] [Y] [Z]
			macro.write ("/output" + newLine);  //Should be turning output off.
			
			macro.write("/t " + x_base + ".5 " + y_base +" "+ z_base + ".5" + newLine);
			macro.write("//pos1" + newLine);
			macro.write("/t " + (x_base + 118) + ".5 " + y_base + ".5 " + (z_base + 65) + ".5 " + newLine);
			macro.write("//pos2" + newLine);
			macro.write("//replace 75 0" + newLine);  //Turn all 1-bits (torches) to 0-bits (air)
			macro.write("//replace 76 0" + newLine);  //75 and 76 are redstone torches.
			//Select a torch:
			macro.write("/t " + unlit_torch + newLine); //On light;  Should be unlit (computer off) when program is installed).
			macro.write("//pos1" + newLine);
			macro.write("//pos2" + newLine);
			macro.write("//copy" + newLine);
			
			Y = y_base;  //Elevation never changes.
			
			for (int command = 0; command < length; command++)  //Iterate through commands.
			{
				X = x_base + (command*2);  //Current X coordinate to write to.
				
				for (byte bit = 0; bit < 33; bit++)  //Iterate through bits.
				{
					Z = z_base + (bit*2);  //Z coordinate of command[bit]
					bin = program.command[command].getBit(bit);
					
					if (bin == '1')  //Only paste torches for 1's, 0's stay air.
					{
						updatesDone++;  //One more paste that must be undone to remove the program.
						macro.write("/t " + X + ".5 " + Y + ".5 " + Z + ".5" + newLine);  //Teleport to X Y Z
						macro.write("//paste" + newLine);  //Paste unlit torch.
					}
					else if (bin != '0')  //0 is only other valid binary value.
					{
						macro.write("/msg Error! Invalid program!");
						macro.close();  //Close file before exiting.
						throw new IllegalArgumentException (bin + " is non-binary.  Cannot export.");
					}
				}
			}
			
			macro.write("/output" + newLine);  //Re-establish output, for the following messages.
			
			macro.write ("/msg Please only install programs when the computer is off." + newLine);
			macro.write ("/msg RedGame program installed successfully." + newLine);
			macro.write ("/msg To remove, undo " + updatesDone + " changes.");
			
			macro.flush ();
			macro.close ();
		}
		catch (IOException e)
		{
			ErrorLog.addError (e.getMessage() + " When saving macro file.");
		}
	}