private void saveProgramContext(Address start, Address end) {
		if (end == null || start.compareTo(end) > 0) {
			throw new IllegalArgumentException("Invalid context range: (" + start + "," + end + ")");
		}

// TODO: Should disassembler context be used for anything other than the context-register ??

		Iterator<Register> it = registerStateMap.keySet().iterator();
		while (it.hasNext()) {
			Register reg = it.next();
			if (reg.isProcessorContext()) {
				continue;
			}
			RegisterValue value = registerStateMap.get(reg);
			try {
				programContext.setRegisterValue(start, end, value);
			}
			catch (ContextChangeException e) {
				// we should never be writing the context register
			}
		}
	}
Saves the context from the startAddr (inclusive) to the end address (inclusive)
back to the program's stored context.
@param startAddress 
@param endAddress
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/disassemble/DisassemblerContextImpl.java