4 ms·
Printing is essentially a communications function. You send bytes to a device over a bus or port. You don't need any sort of access to hardware registers. LP
by tenebrisalietum 6y ago
Printing is essentially a communications function. You send bytes to a device over a bus or port. You don't need any sort of access to hardware registers.
LPT1/COM are not emulations of unprotected memory-mapped IO channels. They're DOS device names, inherited more or less from CP/M, and DOS itself would call a routine to I/O to a device instead of a file if the special device names were used. A DOS program didn't need to bitbang the UART or parallel port registers to print things, though some did I'm sure.
The Windows print spooler does not need to access I/O ports directly, it can simply open up a device and doesn't need kernel-level privileges to do it. (It may very well be actually doing that for some godawful reason but it doesn't need to).
What the Windows print spooler does is allow distribution and even installation I believe of print drivers - and that's why it needs kernel-level access and support of that hardware is why the Windows spooler architecture won't change. Something is going on because you can't delete print drivers in Windows with the spooler service running.
This is part of Microsoft trying to make network printers plug and play. Tbf it's working OKish these days, a lot of times you can connect a printer and it's recognized or installed by Windows automatically, though you still need to install your scanner utilities for AIO devices.