dBase II and Windows

dBase II was a database management system for a very old computer system. Despite its age, it was innovative, powerful, flexible, and incredibly useful.

It looked like this:

And it ran things like this:

Mainframes were expensive computers that were at universities or in some large government departments. Big business used minicomputer systems, if the businesses were big enough and could afford them. Small business had nothing. It was an era where paperwork actually existed on paper. The personal computer didn’t exist (after all, no one person could lift one); but some people were tinkering with a thing called a microprocessor.

dBase II was introduced into that era.

It was surprising really because the hobbyists (tinkerers) were just seeing what limited things they could manage with something that was very cut-down. Big business had their business solutions on business computers, and they had paid well to get them too. Why anyone ever thought of attempting to do a business program for a small-business market that didn’t exist and which ran on hardware that didn’t exist; just amazes me. If you can sell a business plan like that to a bank or to some backers, you are an outstanding salesman or very very good at presentations.

The unbelievable happened. It got released.

What’s more: it was good enough, and complete enough, and reliable enough – despite running on “hobbyist” hardware – that it interested small businesses. Hobbyist hardware started becoming commercial and small business started automating paperwork.

The development of the market took more than just dBase II, but dBase II was certainly a major contributor. It was a full database system! It wasn’t just, “type some information in and see it come back out again” as a suggestion of what might become possible one day. The day was now. It was here.

A lot of small business programs were written using dBase II and it showed up in lots of small businesses. Why wouldn’t you get a system for your business when you can get more done with less, save money and beat your competitors. It caught on very fast. The wikipedia article is dBase.

The dBase language moved on through later versions. The hardware evolved to personal computers and the operating system that ran it evolved to MSDOS (for personal computers). Given its success, as you’ll see in the wikipedia article, it had many clones. They were all “mostly compatible” with the official language. This meant you could take your existing dBase business application and compile it or run it on the “newer/better” dBase clone.

Personal computers moved onwards and MSDOS became MS Windows. Things no longer worked quite the same way. Basic principles like 24 lines of 80 characters of text, were no longer principles. Windows were resizable and characters no longer had a fixed width. A screen design based on 24×80 no longer made sense.

Other solutions replaced dBase in the Windows era; but it never really died out. You can still find a version of dBase (or XBase) today, and it will run on a Windows desktop computer. It’ll look a bit different. It’ll work a bit differently. However, it is still fundamentally what dBase II was all those years ago.

As with most Windows programs though, what has changed significantly is the size.

dBase II originally had to run in less than 64KB of computer memory. The achievement of fitting all of the functionality of dBase II into less than 64 KB of memory is really impressive. They did cheat a little, as dBase II was one of the first programs of that era to use overlays. That is like virtual memory these days, where computers run programs that are too big to fit in memory by only loading the bits that they are trying to run as they run it. Overlays predate that nicety. Overlays are where the program had to swap itself in and out of memory with no built-in support from the operating system or processor.

The entirety of the dBase II program (DBASE.COM plus DBASEOVR.COM, in ver 2.4) took up 60 KB on disk. The help file took up another 52 KB but that was never “run” – it’s just a text file.

The current version of DBFree, a free open source clone based on dBase, is V41 and the download of that is 21 MB. That probably has a number of features that dBase II never had, and it does deal with a Windows GUI; but it is also 300 times larger. It’s also not dBase II.

Writing dBase II for Windows

What I thought would be nice, would be a port of dBase II to Windows.

Now that doesn’t seem to actually be possible – as I don’t have the source code for the real thing; but it is possible to do a functional equivalent. So that’s what I’ve done. It looks like:

It also runs dBase II programs. That looks like:

Given I’d done BASIC in about a week, I had no inkling that a nice idea like “doing dBase” was then going to consume six months of my part-time effort. It did provide a greater insight and appreciation of those developers that cloned dBase in the first place (and of the work that will have gone into DBFree).

dBase II was too early in computing’s history to conform to some things that have since become commonplace. It made things a lot harder in some ways. The best example is “tokens”. Modern languages split a sequence of characters into “tokens” and then treat them according to their token types. Examples are: “some text” (a string), 123.45 (a number), and – (an operator). This approach allows a language to split 45-3 into three tokens: 45, -, and 3. It can work that out as 42. However, dBase II also has the idea of a “word” – which breaks the token rules. For example: USE 45-3 gets treated as ‘USE’ then ’45-3′ and that means open the database named ’45-3.DBF’ not open a database named ’42.DBF’.

My implementation isn’t perfect. There are some things I’ve left out for now, and I haven’t fully addressed the tokens vs words issue; but if you’re interested, you can download it and have a play.

The download link is db1-2.40.zip. It is more than 60 KB; but ZIPped and including the help file, it only comes to 115 KB. When I add in the sample databases and programs, that goes up to 132 KB.

You just unZIP the file somewhere and double-click db1.exe to run it.

Comparing it to the real thing

If you want to run the original dBase II within a Windows environment, you can use my port of Udo Munk’s z80sim for Windows. You just download the file, unZIP it somewhere, and double-click run.bat. You’ll see an “A>” prompt from the original (CP/M) operating system. You type “B:” and press ENTER to get a “B>” prompt, then “dbase” ENTER to run dBase II. It will ask about the date. You can type a value or just press ENTER.

The download links for these are:
run-dbase2.3b.zip
run-dbase2.4.zip
run-dbase2.41.zip

To exit from the dBase II dot prompt, type quit and press ENTER.
To exit from the z80 simulator that was running it; click the [X] on the window title bar, or type X and press ENTER at the “B>” or “A>” prompt.

Db1 license

You can see the db1 license by typing HELP LICENSE at the dot prompt. If you are comfortable that db1 does enough of what you need it do and you’d like to use it commercially, that’s allowed. If you’d like ongoing support for it, contact me.

This is part of the CP/M topic.

It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUponDigg thisPin on PinterestEmail this to someone

One thought on “dBase II and Windows”

  1. Finally! Now I can do with a computer again what I could do on an Amstrad Z80 back in 1986, and haven’t been able to resume since going PC, mainly due to the, I think, well-justified fear of bloat. This is marvellous, and not even for sentimental reasons.

Leave a Reply

Your email address will not be published. Required fields are marked *