Running a 30 year old BASIC program on my Mac

One aspect of our shared childhood that my brothers and I all remember clearly is The Budget.

We were never completely sure what it meant, but we all remember our parents talking about it, and we remember that there were various systems in place that regulated it.

For example, if we needed $5 for fish and chips in the cafeteria on Friday, there was a pencil case on our father’s dresser that held petty cash that we could get the $5 from, but we had to note this on a chit, and the chits were collected and factored somehow into The Budget.

Our parents are both systems thinkers, and The Budget was an integral part of maintaining and organizing the economic fuel that allowed a family of 6 people to get by on a single salary.

In the mid-1980s we started to have computers in the house: first a TRS-80 Colour Computer, which my father brought home one day and upon which he (and I) spent many hours typing away (I sometimes think that 20% of my youth was taken up typing in program listings from Creative Computing and Byte).

Dad’s tour de force, programming wise, was the creation of a BASIC program to track The Budget. In the years since this has been replaced by off-the-shelf applications like Quicken, but at the time it was all hand-coded and thus custom-tailored around the economic ecosystem of our family.

Another aspect of our parents’ systems thinking is a predilection for archiving, and so that BASIC program, in its various versions, has survived in Dad’s digital collections all these years and the version from 1986 — BUD86.BAS — surfaced recently and he wondered whether it was possible to run it on a modern computer.

It turned out to be surprisingly easy.

PC-BASIC is a free cross-platform GW-BASIC emulator that’s available for the Mac. I downloaded and installed it, and once I realized that its “working directory” was my home directory on my Mac, I simply copied the BUD86.BAS code into that directory and:

Running PC-BASIC on a Mac

at which point — somewhat magically given that 30 years had passed — this appeared on the screen:

PC-BASIC running a BASIC program on my Mac

Just looking at the menu can tell you a lot about the financial setup of our family the year that I turned 20: a MasterCard, a Visa, department store cards from Sears and Eatons, and a chequing account.

There’s no actual data there. And, it seems, no way of adding new transactions (I’ve asked Dad whether there was a separate program for that). But entering “4” for “CAT. TOTALS” you can gain some additional insight into the way that things got categorized:

Budget Categories

Every member of the family — N, F, P, M, J and S, listed in birth order — got a “Clothing” category. And there were categories for Food, Meals Out, Household, Education, Recreation, Property Tax, Union Gas, and Hydro. On the next page the list continued: Phone, Car, Gasoline, Fitness, Medical/Dental, Professional Dues, Christmas, Life Insurance, House Insurance, Computer, Miscellany.

That there was a budget category for “Computer” is interesting in and of itself. Indeed, surely there’s much to be mined from this sort of information about the social and economic history of the late 20th century Canadian family; I hope other families have an archival bent and have saved their own particular budgeting schemes so that they can form the part of a broader analysis of this type of thing for anthropologists of the future.

Meanwhile, I’m sad to report that there are no aspects of the formal organization The Budget left in my Charlottetown branch of the family; perhaps because we’re a smaller crew, perhaps because we’re lazy, but our approach to budgeting has been, most of the time, “save what we can, spend the rest.”  

Vestigially expressed from deep within me, however, is an economy of spending that I inherited from my parents (that, I imagine, they inherited from their parents, who lived through the Great Depression): I feel guilty every time I spend money, and if there’s a way of avoiding it, I’ll always take that way first.

It may not be the least stressful way to live, but it got my family through the 1970s and 1980s in one piece, so it can’t be all that bad.

Where should we start counting, 0 or 1?

Here’s something you might do when you’re writing a computer program:

$months = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

This happens to be a bit of the PHP computer language, but similar constructions are available in almost any language: this defines an array – a “collection,” you might say – of months. You don’t have to be a computer programmer to realize that this would have utility in any number of computer programs: collecting credit card expiration dates or birth dates, allowing a search of a database of events by month, and so on.

One of the rookie mistakes we all made when we first started programming is to think that when we, say, want to refer to the month of May, we’d refer to:


May is, after all, the fifth month, and in a collection of months it would only make sense, wouldn’t it, that May would be referenced as such?

Except that PHP, by default, uses zero-based arrays. Which means that in my array of months the first month is 0, the second month is 1, the third month is 2, and so on. Meaning that the month of May is actually referenced as:


This is something that causes no end of confusion for the novice programmer. And, indeed, for the veteran as well, on occasion.

You might think that this is a post about computer programming, but it’s not.

Longtime readers may recall the story I posted here about taking the metro in Porto, Portugal, ten years ago this week: that story too involved zero-based counting.

To refresh your memory, Catherine and Oliver and I were nabbed by the Porto transit cops for traveling without a proper ticket. We were taking Line A from Senhor de Matoshinhos to Campanhã, where we were to catch the train. Here’s the list of stops on that line:

Porto Metro Line A Map

Porto uses a zoned ticketing system, and we reasoned that because Senhor de Matoshinhos was in Zone C3 and Campanhã was in Zone C1, we would need a 2-zone ticket, as we’d be crossing two zone boundaries. 

In other words, we assumed the metro system used zero-based numbering for its ticketing: we started counting 0 in Zone C3, then 1 for Zone C2 and 2 for Zone C3. And so we bought 2-zone tickets.

But Porto’s metro uses a one-based numbering system for its ticketing: you start counting 1 for the zone you’re starting in, and count up from there. Which means that to go from Senhor de Matoshinhos to Campanhã we needed a 3 zone ticket.

The same issue bit me last December in Montreal, albeit counting days, not zones.

In Montreal you can buy a 3-day transit pass valid for unlimited travel across the system. Oliver and I arrived in the city on Thursday, and immediately purchased this pass. I assumed that it would last us until our Sunday departure:

  • Thursday to Friday — 1 day
  • Friday to Saturday — 2 days
  • Saturday to Sunday — 3 days

I was using zero-based counting, assuming that Thursday was day 0.

And, again, I was wrong. As is made rather clear on the STM explanation of the pass, it’s good for “3 consecutive days” of travel, meaning that, as with Porto and its zones, you start counting with 1.

I realized the folly of my ways when Sunday arrived and my mother, who had purchased her own 3-day pass on Friday, was happily accepted with a “green” signal when we got on the bus where Oliver and I, following behind her, were rejected with a “red” signal.

So you’d think I’d be safe simply assuming that one-based numbering is universal and using that as my default.

But it’s not.

Next week I’m spending 6 days in New Hampshire at Yankee Publishing and I pre-loaded a Roam Mobility prepaid SIM card up in anticipation. Roam’s text + talk + data plan is billed by the day. I reasoned, knowing the error of my earlier ways, that because I’d be in New Hampshire for 6 days, I needed to purchase 6 days worth of service.

But I was wrong.

Roam uses zero-based day-counting for its system: a “day” in their world is a 24 hour period starting from the hour of activation. So I only needed “5 days” of service to cover the period from Sunday in the late afternoon to Friday in the late afternoon:

  • Sunday — Day 0
  • Monday — Day 1
  • Tuesday — Day 2
  • Wednesday — Day 3
  • Thursday — Day 4
  • Friday — Day 5

Perhaps the greatest international schism related to zero- vs. one-based numbering has to do with building-floor-numbering.

In Canada we start counting the floors in a building at one: you enter a building from the street and you’re on the first floor.

In Britain, though, and in much of Europe, entering from street level puts you on the ground floor; to get to the first floor you need to walk up one flight of stairs. So if you let a “first floor flat” in London on Airbnb, you’re going to have to walk up a flight of stairs to get to it. And if you let a “fifth floor flat” you’re going to have to walk up five flights of stairs, not four.

The Canadian system is one-based and the British system is zero-based.

And even here in Canada we have difficulty being clear about what floor is what; witness this elevator button pane in Charlottetown City Hall, which should be intuitive and clear but is anything but:

Charlottetown City Hall Elevator Buttons

Given how confusing it can be to use zero-based counting in a one-based system, or vice-versa (believe me, I’ve spent enough time wandering around European buildings looking for friends’ apartments on the wrong floor to know), you’d think there’d be an easier shorthand for communicating about the issue, and that pains would be taken to make it clear, especially in situations where tickets and billing are concerned, which system is in use.

But it seems to be assumed that we should know this intuitively, and we don’t have easy shorthand for communicating about it: I had to call Roam Mobility last week and ask something along the lines of “if I’m arriving in the US on Sunday and leaving on Friday, do I need to purchase 5 days of service or 6?” The agent I spoke to was obviously used to answering questions like this, which adds credence to the notion that this should be made clearer on the Roam website. For example, they could change their purchase widget from:

Current widget

to this, adding the expiration date so that it’s clear what “5 days” means:

Change the widget to show expiration date and time.

As it is we’re all forced to greet each new system, and each new jurisdiction, assuming that they could start counting at either zero or one, and to discover through experience — or the threat of arrest at the hands of the transit cops — which it is.

CalDAV Saves the Night

We decided to make a family trip to see the latest X-Men movie tonight. To avoid the rush, I bought tickets online and had the ticket retrieval code delivered to my phone.

When we arrived at the movie theatre, I realized I’d left my phone at home; there wasn’t enough time to run home to pick it up, and so I thought we were stuck, either with buying new tickets or giving up on the night out.

Then I remembered that Cineplex provided me with an iCalendar file on the purchase confirmation page that, on a lark, I grabbed into the Calendar app on my Mac.

The calendar I imported it into, as it happens, is automatically synced to my phone, and to Catherine’s phone, via CalDAV using my ownCloud server.

Was Cineplex be smart enough to include the ticket retrieval in notes of the calendar entry? Yes!

And so I was able to simply open the Calendar app on Catherine’s phone and, voila, I had what I needed and our night at the movies was saved.

A Party for the 90 Year Olds

Three weeks ago I received an intriguing proposal from my friend Kevin Lewis. Kevin was helping to organize an event at Government House to commemorate the 90th birthday of Her Majesty Queen Elizabeth II to which all Prince Edward Islanders turning 90 years old themselves this year would be invited. The Lieutenant Governor wanted to present something to each attendee to mark the day, and Kevin wondered whether this might be something I could set and print. It’s not every day that such an opportunity comes along, and so I readily agreed to become, for a moment, a de facto Queen’s Printer.

Kevin sent me the text that needed to be set on April 29 in a Word document; it looked like this:

Certificate Wording (screen shot of Word file)

For the primary typeface, I selected a font of Bodini 24 point bold that I acquired four years ago from a printer in Montreal. It was the right type size, and it’s in fine condition, in part because it’s foundry type.


For the “1926-2016” and “90th Birthday”, which needed to be called out, I set on 30 point Futura Bold, acquired last summer on a trip to New England from Letterpress Things in Massachusetts:

New Font from Letterpress Things

It was at about this time, before any type was set or cards printed, that I decided to take an impromptu trip to Europe for 10 days. I alerted Kevin that this would mean cutting setting and printing time close, and I offered to bow out, but he bravely asked me to soldier on, so I did, returning to the print shop last week upon my return.

I experimented with several layouts. My first proofs had the bottom two lines set in 14 point Bodini, but I didn’t like that, so I reverted to using the same 24 point as for the rest of the piece. I tried various klischees out for the separator between the body and the bottom two lines, eventually settling on a small one of a flower. And I learned that I’d be able to print on card stock already pre-printed with the vice-regal emblem in gold, so I mocked that into the final proof.


With the final design completed, and the copy approved by Government House, I went into the print shop on Sunday afternoon for the printing. This is what the final type, all locked up in the chase and ready for printing, looked like:

90th Birthday Type Set

Here’s the type locked into the press, with the ink disc ready with purple ink (a donation from KKP here in Charlottetown several years ago that I kept around just for this very moment):

Purple Ink

Here’s the first test print, marked up with guides so that I could properly position the gauge pins:

90th Birthday Printing

And here’s the final version of the card. Truth be told, it’s the just-previous-to-final version, as you’ll note that on the second line, the second letter “e” in “Celebration” isn’t printed completely; it turned out there was a nick in the letter, solved by replacing it:

90th Birthday Certificate

I printed 115 copies – there were 71 people signed up for the tea party, and it never hurts to have extras. I set the cards out to dry overnight in the gallery downstairs at The Guild – luckily empty for the Victoria Day holiday – and packaged them up and delivered them to Kevin yesterday afternoon (still, as it turned out, a little tacky to the touch, necessitating they be spread out all over Kevin’s house).

Government House generously extended an invitation for Catherine and I to attend the first of two tea settings this morning (there turned out to be so many 90 year olds on PEI that they needed to split the group into two!) and so at 11:00 a.m. this morning we set off in our Sunday best, a little timid at our somewhat-younger-than-90-year-old-ness.

Government House

We need not have worried: it was a delightful event. We had the pleasure of being seated across from Mary Hooper and her son (Mary, this being Prince Edward Island, is the grandmother of my Guild office-mate Michelle Hooper – and the brother of the late Milton Acorn to boot). There were sandwiches with the crusts cut off. Tiny cupcakes. Shortbread cookies. And birthday cake.

90th Birthday Remarks from Hon. Frank Lewis

Government House Teacup

As letterpress commissions go, it doesn’t get much better than this; thanks to Kevin for entrusting me with the work.