private void processRegisters(Program program, MzExecutable mz, MessageLog log,
			TaskMonitor monitor) {
		monitor.setMessage("Processing registers...");

		Symbol entry = SymbolUtilities.getLabelOrFunctionSymbol(program, ENTRY_NAME,
			err -> log.appendMsg(err));
		if (entry == null) {
			return;
		}

		// TODO: can better do this in an analyzer on the entry point
		//       might work in some cases.
		DataConverter converter = LittleEndianDataConverter.INSTANCE;
		boolean shouldSetDS = false;
		long dsValue = 0;
		try {
			for (MemoryBlock block : program.getMemory().getBlocks()) {
				if (block.contains(entry.getAddress())) {
					byte instByte = block.getByte(entry.getAddress());
					if (instByte == MOVW_DS_OPCODE) { //is instruction "movw %dx,$0x1234"
						byte[] dsBytes = new byte[2];
						block.getBytes(entry.getAddress().addWrap(1), dsBytes);
						dsValue = converter.getShort(dsBytes);
						shouldSetDS = true;
					}
					break;
				}
			}
		}
		catch (MemoryAccessException e) {
			//unable to set the DS register..
		}

		OldDOSHeader header = mz.getHeader();
		ProgramContext context = program.getProgramContext();
		Register ss = context.getRegister("ss");
		Register sp = context.getRegister("sp");
		Register ds = context.getRegister("ds");
		Register cs = context.getRegister("cs");

		try {
			context.setValue(sp, entry.getAddress(), entry.getAddress(),
				BigInteger.valueOf(Short.toUnsignedLong(header.e_sp())));
			context.setValue(ss, entry.getAddress(), entry.getAddress(),
				BigInteger.valueOf(
					Integer.toUnsignedLong((header.e_ss() + INITIAL_SEGMENT_VAL) & 0xffff)));

			for (MemoryBlock block : program.getMemory().getBlocks()) {
				Address start = block.getStart();
				Address end = block.getEnd();
				
				if (!(start.getAddressSpace() instanceof SegmentedAddressSpace)) {
					continue;
				}
				
				BigInteger csValue = BigInteger
						.valueOf(Integer.toUnsignedLong(((SegmentedAddress) start).getSegment()));
				
				context.setValue(cs, start, end, csValue);
				if (shouldSetDS) {
					context.setValue(ds, start, end, BigInteger.valueOf(dsValue));
				}
			}
		}
		catch (ContextChangeException e) {
			// ignore since segment registers should never cause this error
		}
	}
Stores a relocation's fixup information

@param relocation The original relocation info
@param address The {@link SegmentedAddress} of the relocation
@param fileOffset The file offset of the relocation
@param segment The fixed-up segment after the relocation is applied
@param valid True if the relocation is valid; otherwise, false
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MzLoader.java