You can't perform direct hardware access to certain ports
such as the COM port and some types of access to the LPT
port.
If you attempt to execute code which violates this, the
Windows NT NTVDM sub-system (16-bit) will prevent you from
completing the operation and halt the program. You will
be notified by the sub-system with a mesasge box stating
that a 16-bit application attempted to directly access
hardware. You will be given the choice of either End Task
(and kill the NTVDM session) or Deny Access.
Some LPT activity is automatically redirect to the Windows
NT Print Spooler service which will attempt to dump the
output as text to the printer.
You can't use the LPT port for input, only output. (The
print job is not directly interactive with the printer,
only spooled)