Saturday, October 4, 2008

dos

In 2008, this guy is still including dos.h.
Vista's command prompt still uses DOS commands.
In Romania, certain high-school programming contests are still happening in Borland C (on DOS), and many high-school students are still learning programming in Borland Pascal (on DOS).
A few weeks ago a 1990s program didn't work in dosemu with a USB-to-RS-232 converter. Was it failing because of the high clock speed, like the Pascal library? Was it written like the guy's code? Was it failing because the serial converter wasn't emulated accurately enough? I don't know.
Anyway, I thank Microsoft for removing the serial ports from desktop PCs and notebooks (they're not called laptops anymore, because some dissipate too much heat to allow comfortable use in one's lap).
Apart from the once ubiquitous but now outdated dial-up modems and serial mice, serial ports are actually useful for a huge lot of devices and tasks, such as:
  • dial-up modems. Over mobile GPRS or satellite.
  • serial mice. Why occupy a hi-speed USB port with a low-speed mouse? (if you happen to want 2 or 3 mice on your system)
  • serial barcode scanners
  • small serial printers (frequently used for printing receipts)
  • uninterruptible power supplies
  • networking (wireless modules for interfacing low-power sensor networks, for instance. The networks run IPv6, btw.)
  • GPS receivers
  • mobile phones and PDAs (some mobile phone "USB data cables" are actually USB-serial converters)
  • a huge variety of industrial and laboratory instruments (meters, process controllers etcetera)
  • infrared communication (with mobile phones, PDAs, instruments etc)
  • serial console for configuring and debugging routers and other embedded systems and screenless devices. Frequently used by network administrators.
  • microcontroller programming, homebrew hardware, firmware upgrade for various devices
  • small auxiliary text-mode LCD screens to display what song you're playing or what mail you've got or whatever
  • infrared remote control receivers (for controlling your computer from the comfort of your bed/armchair/whatever)
  • low cost, easy to build laser links between buildings (with enough speed - 92kb/s - to stream medium-quality audio, transfer documents or work in a remote shell)
  • etcetera.
There. Fuck you, PC 97.

2 comments:

etor said...

Of course, you are obviously ignoring a great goal of the human kind: to unify, to create something that is unique and flexible, equivalent to some great pile of specialized, rigidly-designed equipment.

I find it useless to point out why I support USB over serial ports in ANY situation, because you know all the arguments I can bring into the discussion, and even more.

But I do want to emphasize the elegance, flexibility and modularity of the USB standard. Also, serial ports are much more expensive. And USB supports hubs, which can help you connect up to 256 mice if you want to, or serial converters for the pieces of equipment that don't bother having USB connections.

razvan784 said...

Nay.
Serial ports are simpler. It's much easier to toggle a few control lines and shift a few bits than to handle the complexity of a multi-layer protocol in hardware. That's why serial ports are actually cheaper to implement. Dirt cheap actually by comparison (connectors costing about the same). Having them in addition to USB on the other hand adds some expense, of course. In any case, the cost for both technologies is small in the case of computers. I was thinking more about the cost of the devices than the actual PC. For example, you simply cannot implement an infrared remote control receiver on USB and make it cheaper than serial, because you'd need an extra chip.
You can actually only put 127 devices on a USB host controller, one of which is the root hub. You also cannot chain an unlimited number of hubs (about 5, not sure), and besides, hubs are expensive and you're still sharing the bandwidth and waiting on other devices.
Anyway, I wasn't arguing against USB, it's a good technology. I was arguing for keeping the serial ports, maybe with smaller connectors.