protected List<IntelHexRecord> dumpMemory(Program program, Memory memory,
			AddressSetView addrSetView, TaskMonitor monitor) throws MemoryAccessException {

		int size = (int) recordSizeOption.getValue();
		boolean dropBytes = recordSizeOption.dropExtraBytes();

		IntelHexRecordWriter writer = new IntelHexRecordWriter(size, dropBytes);

		AddressSet set = new AddressSet(addrSetView);

		MemoryBlock[] blocks = memory.getBlocks();
		for (MemoryBlock block : blocks) {
			if (!block.isInitialized() ||
				block.getStart().getAddressSpace() != addressSpaceOption.getValue()) {
				set.delete(new AddressRangeImpl(block.getStart(), block.getEnd()));
			}
		}

		AddressIterator addresses = set.getAddresses(true);
		while (addresses.hasNext()) {
			Address address = addresses.next();
			byte b = memory.getByte(address);
			writer.addByte(address, b);
		}

		Address entryPoint = null;
		AddressIterator entryPointIterator =
			program.getSymbolTable().getExternalEntryPointIterator();
		while (entryPoint == null && entryPointIterator.hasNext()) {
			Address address = entryPointIterator.next();
			if (set.contains(address)) {
				entryPoint = address;
			}
		}
		return writer.finish(entryPoint);
	}
Verifier for a {@link HintTextField} that ensures input is a numeric value between
0 and 0xFF.
<p>
Input may be specified in either decimal or hex.
Ghidra/Features/Base/src/main/java/ghidra/app/util/exporter/IntelHexExporter.java