public final Instruction getLastInstruction() {
		Address address = currentProgram.getMaxAddress();
		InstructionIterator iterator = currentProgram.getListing().getInstructions(address, false);
		if (iterator.hasNext()) {
			return iterator.next();
		}
		return null;
	}
Returns the last instruction in the current program.
@return the last instruction in the current program
Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java