public boolean makeTable(Program program, int start, int end, boolean createIndex,
			boolean autoLabel) {
		if (end > tableElements.length - 1) {
			end = tableElements.length - 1;
		}
		if (end < start) {
			end = start;
		}
		int len = end - start + 1;
		Address currentAddress = topAddress.addWrap(start * addrSize);

		// make sure this pointer is in the data type manager
		// since we are going to use it a lot
		DataType adt;

		//TODO: Do I need to do something special for the 3 byte pointers or will it know
		// how to make it automatically?
		DataTypeManager dtm = program.getDataTypeManager();
		if (shiftedAddr) {
			adt = ShiftedAddressDataType.dataType;
		}
		else if (addrSize == program.getDefaultPointerSize()) {
			adt = new PointerDataType(DataType.DEFAULT, dtm);
		}
		else {
			adt = new PointerDataType(DataType.DEFAULT, addrSize, dtm);
		}
		adt = dtm.resolve(adt, null);

		Address newAddress = currentAddress;

		// check to make sure there is no existing things overlapping the table or the index
		Listing listing = program.getListing();
		int totalLen = (len * addrSize + skipAmount);
		if (createIndex) {
			totalLen += getIndexLength();
		}
		if (!listing.isUndefined(currentAddress, currentAddress.addWrap(totalLen - 1))) {
			for (int k = 0; k < totalLen; k++) {
				Data data = listing.getDataContaining(currentAddress.addWrap(k));
				if (data == null ||
					(!(data.isPointer() || data.getDataType() instanceof Undefined) &&
						data.isDefined())) {
					return false;
				}
			}
		}

		//  make the pointers
		// TODO: add in the skip Length
		for (int j = 0; j < len; j++) {
			try { // make the data an address pointer
				DataUtilities.createData(program, newAddress, adt, adt.getLength(),
					DataUtilities.ClearDataMode.CLEAR_ALL_UNDEFINED_CONFLICT_DATA);
			}
			catch (CodeUnitInsertionException exc) {
			}
			newAddress = newAddress.addWrap(addrSize + skipAmount);
		}

		if (createIndex) {
			createTableIndex(program);
		}

		if (autoLabel) {
			setLabels(program, currentAddress, len, start);
		}

		return true;
	}
Make the table

@param program
@param start start index
@param end end index (inclusive)
@param createIndex don't create index if false
@param autoLabel true if labels should be created on the table
@return true if tablecreated else false
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/disassembler/AddressTable.java