private boolean processParameters() {

		Address minAddr = null;
		Address maxAddr = null;

		AddressFactory addrFactory = currentProgram.getAddressFactory();

		boolean missingParam = false;

		String minAddrStr = propertiesFileParams.getValue("min");
		if (minAddrStr == null) {
			printerr("Missing required minimum address property: min");
			missingParam = true;
		}
		else {
			minAddr = addrFactory.getAddress(minAddrStr);
			if (minAddr == null) {

				// Try as block name
				MemoryBlock block = currentProgram.getMemory().getBlock(minAddrStr);
				if (block == null) {
					printerr("Failed to parse min address/block: " + minAddrStr);
					missingParam = true;
				}
				else {
					minAddr = block.getStart();
					maxAddr = block.getEnd();
				}
			}
		}

		if (maxAddr == null) {
			String maxAddrStr = propertiesFileParams.getValue("max");
			if (minAddrStr == null) {
				printerr("Missing required maximum address property: max");
				missingParam = true;
			}
			else {
				maxAddr = addrFactory.getAddress(maxAddrStr);
				if (maxAddr == null) {
					printerr("Failed to parse max address: " + maxAddrStr);
					missingParam = true;
				}
			}
		}

		String filepath = propertiesFileParams.getValue("out");
		if (minAddrStr == null) {
			printerr("Missing required output file path property: out");
			missingParam = true;
		}
		else {
			outFile = new File(filepath);
			File parentDir = outFile.getParentFile();
			if (!parentDir.exists()) {
				printerr("Output directory not found: " + parentDir.getAbsolutePath());
				missingParam = true;
			}
		}

		if (missingParam) {
			return false;
		}

		if (!minAddr.hasSameAddressSpace(maxAddr) || minAddr.compareTo(maxAddr) > 0) {
			printerr("Invalid address range: " + minAddr + " - " + maxAddr);
			return false;
		}

		region =
			currentProgram.getMemory().getLoadedAndInitializedAddressSet().intersectRange(minAddr, maxAddr);

		if (region.isEmpty()) {
			printerr("Address range does not intersect initiailized memory: " + minAddr + " - " +
				maxAddr);
			return false;
		}

		ProgramContext programContext = currentProgram.getProgramContext();

		boolean badReg;
		try {
			badReg = false;
			for (String key : propertiesFileParams.keySet()) {
				boolean setRange = false;
				int index;
				if (key.startsWith("set.range.")) {
					setRange = true;
					index = 10;
				}
				else if (key.startsWith("set.")) {
					index = 4;
				}
				else {
					continue;
				}
				String regName = key.substring(index);
				Register reg = currentProgram.getRegister(regName);
				if (reg == null || !reg.isProcessorContext()) {
					printerr("Processor context register field not found: " + regName);
					badReg = true;
					continue;
				}

				BigInteger value;
				String valueStr = propertiesFileParams.getValue(key);
				try {
					value = BigInteger.valueOf(Long.parseLong(valueStr));
				}
				catch (NumberFormatException e) {
					printerr("Invalid register set value: " + valueStr);
					badReg = true;
					continue;
				}

				if (setRange) {
					programContext.setValue(reg, minAddr, maxAddr, value);
				}
				else {
					programContext.setValue(reg, minAddr, minAddr, value);
				}

			}
		}
		catch (ContextChangeException e) {
			printerr("Program must be clear of all code units!");
			printerr(e.getMessage());
			return false;
		}

		if (badReg) {
			return false;
		}

		return true;
	}
Required properties:
 min - minimum disassembly address or block name
 max - maximum disassembly address (not used if block name used for min)
 out - disassembly output file path

Optional:
 set.<context-reg-name>       - optional starting context value
 set.range.<context-reg-name> - optional context value over range
Ghidra/Features/Base/developer_scripts/RangeDisassemblerScript.java