In the figure we have the way to linearize the response of a TTL port with the use of a feedback resistor. This circuit applies only to the port indicated in the diagram, which is from an 80's series.