public CodeUnitIterator getCodeUnits(Address start, boolean forward) {

		Memory mem = program.getMemory();
		AddressSet bounds;
		if (forward) {
			Address max = mem.getMaxAddress();
			if (start.compareTo(max) > 0) {
				return new EmptyCodeUnitIterator();
			}
			bounds = program.getAddressFactory().getAddressSet(start, max);
		}
		else {
			Address min = mem.getMinAddress();
			if (start.compareTo(min) < 0) {
				return new EmptyCodeUnitIterator();
			}
			bounds = program.getAddressFactory().getAddressSet(min, start);
		}

		AddressSet set = mem.intersect(bounds);
		if (set.isEmpty()) {
			return CodeUnitIterator.EMPTY_ITERATOR;
		}
		return new CodeUnitRecordIterator(this, getInstructions(start, forward),
			getDefinedData(start, forward), mem.intersect(bounds), forward);
	}
Returns an iterator over all codeUnits in the program from the given start address to either 
the end address or the start address, depending if the iterator is forward or not.
@param start the starting address for the iterator.
@param forward if true the iterator returns all codeUnits from the given start address to 
the end of the program, otherwise it returns all codeUnits from the given start address to 
the start of the program.
@return code unit iterator
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeManager.java