Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×
User Journal

Journal Journal: Legacy Systems

I've spent a number of full weekends (you know the type - Friday after work 'til 8AM, Sat Noon-5AM, Sunday 10AM to 3AM) updating some legacy DOS software.

The software is a modem server that allows remote devices to dialin & send data using a proprietary format. The data is saved in a local, proprietary flat-file database and reports are dumped to a printer on the parallel port.

The new requirements were:

  1. It needed to continue to run under DOS (there were specific val/ver/cert issues that prevented extensive changes)
  2. It needed to work with current UARTs & modems.
  3. It needed to be network/web enabled.

#3 was addressed by buying an Ultra 10 & installing a Sun PC/PCI card (700MHz AMD PC on a card). This allowed the existing system to run in DOS (FreeDOS) while giving Unix access to its data files. On the Unix side, cron jobs run to grab data updates & ship them off to the web/database system.

This left 1&2. The software was extremely flakely with the latest com hardware & modems. In addition, #3 still had some problems for unknown reasons...

So step 1 was to get the source code. After much prodding & pushing this was accomplished. I had already figured out from running 'strings' on the .exe that it was Borland C based & I have TurboC 2.0 & BC5 already - that shouldn't be a problem. Once I got the source code in my hands, I realized I needed Borland C++ 3.1 [unless I wanted to go through a lot of pain getting it to work with BC5]. So where in the hell was I going to get that?!

Fortunately, it seems to be pretty readily available as

After a lot of dicking around, I finally got a stable build of the original source. It took me all of an hour of code changes to break the damn thing. More digging around & I remembered those nasty old Borland OVERLAYS...yuck. Okay, another couple of hours & I had the thing working again.

I ripped out all of the printer support (predominately because it used a proprietary set of libraries that didn't come with the source & that I couldn't dig up).

Step 2 - get the com ports working. Fortunately, a nice package came to the rescue in the form of pmcom. Works with Borland & DJGPP. A bunch of changes to hook into the new libs & I've got basic modem com working!! Another big WhoHoo!

Step 3 - get this thing working properly on the Sun PC/PCI card. This mostly consisted of cleaning up some file system call problems in the original code. I also dropped support for writing to that big, nasty flat-file system. Each report is instead written into an ASCII file that is parsed on the web/database side & shoved into a MySQL database.

The rest of the work was cleanup, bug fixes, and the website itself. Did all of the website with Apache+PHP & MySQL. All of the data import was handled with Perl.

In addition to the fact that the pay was good, this was really a fun project - kind've like taking an old car & getting it running again...with the constraint that it has to be someone's primary car when it's done & time is of the essence. Not often I get to really put those old 'get it done right AND get it done right NOW' skills to work...

I suppose it would be nice to finish this up with a fine treatise on how I did all of the development using Linux + a PC Emulator running FreeDOS or VirtualPC on my Mac...

In reality, I booted my Linux box to Win2k & did everything with GVim, edit, and CMD. Although I did install the cygnus utils so I'd have a reasonable grep...

Slashdot Top Deals

Lo! Men have become the tool of their tools. -- Henry David Thoreau