@Override
	public boolean assembleCode() {
		this.readAssemblyFile();
		if (this.fileReference != null) { //Only assemble if file successfully opened
			//Operands are assembled first so their symbolic references can be mapped to actual addresses
			this.separateOperands();
					
			//Assemble the operands (represented as Strings) to real Operands and put them in programCode
			for (int i = 0; i < operandArray.size(); i++) {
				List<String> lineComponents = this.splitCodeLine(operandArray.get(i)); //Break line of code into parts
				
				Data operand = this.assembleOperand(lineComponents);
				if (operand == null) { //Indicates an error in assembling an operand
					return false; //Signals error to GUI code and prevents loading of invalid assembly file
				}
				
				programCode[operandAddressPointer] = operand; //Add the operand to the data array, at specified address
				operandAddressPointer++; //Increment so that the next operand will be stored in the next consecutive address
			}
			
			
			//Instruction labels (if present) must be mapped prior to assembling instructions (so that labels can
			//be resolved when assembling instructions).
			for (int i = 0; i < instructionArray.size(); i++) {
				List<String> lineComponents = this.splitCodeLine(instructionArray.get(i));
				this.mapInstructionLabel(lineComponents, i); 		
			}			
	
			//Assemble the instructions represented as Strings into type Instruction, and put into programCode array
			for (int i = 0; i < instructionArray.size(); i++) { 	
				List<String> lineComponents = this.splitCodeLine(instructionArray.get(i)); //Break a line of code into parts
				
				//Create an instruction/operand from the line components
				Data instruction = this.assembleInstruction(lineComponents);
				if (instruction == null) { //Only happens if an error occurs in instruction parsing
					return false; //Signals an error to GUI code, prevents loading of assembly file
				}
				programCode[i] = instruction; //Add the instruction to array containing assembled program code
			}
			
			return true;
		}
		
		return false; //If file not found		
	}