Return to home page


PoundsShillingsPence - "Patch"


June, 2020

Hi, 1401 Enthusiasts...

My name is Michael Kennedy, in Dublin, Ireland, and I worked with IBM, full-time, writing and managing 1401 software development in the late 1960s and early 1970s. We had a team then of about 5-10 system designers, about 10-20 developers, and various other related roles - admin, scheduling, operators, unit-record prep functions, etc. Obviously, other services were also available from other depts, especially hardware support for repairs, upgrading, etc.

Our 1401s (we had a few sometimes!) had up to the max 16K memory, and tape-drives. Our main apps did not use disk-drives.

All software was developed in Autocoder, and most was for commercial applications. Some device-control software was also developed - I recall very low-level tape-driver software. Some mathematical and scientific apps were also implemented.

(I happen to be an electronics engineer, but all my time in IBM, and about 95% of my time since then, was spent on software, mostly assemblers...).

So, having totally forgotten "Set Word Mark", and CS 132/CS, I've recently bumped into a few websites that cover 1401-based "museums", and I'm delighted to complement the folks who run them, and who are preserving lots of interesting 1401-based knowledge.

Patching "on-the-job"...
(I refer you to old jokes about the car mechanic boasting that he had replaced a piston-ring, but his customer, a surgeon, asking him if he could do it while the engine is running, and accessing the rings only through the exhaust-pipe!).

Back then, I frequently patched programs in memory, while running, especially if a huge 5-10-15-hour production run bombed at the very end, when trying to print a page of final totals (with overflow errors in "edit-formats" - if I remember correctly...). But now, all that knowledge escapes me!

An early TSR?
"Terminate-and-Stay-Resident"... That expression became very popular in the mid 1980s onwards, with the widespread rollout of MSDOS. Maybe best to check on wikipedia but, basically, a TSR is a small program/utility, that's "run" just like any other app, but… it usually remains running in the background when further apps are run - hence the title.

It might perform various functions, such as intercepting data being sent to printers, and, instead, spooling this data to a disk-file, or discarding the data. It might intercept all keyboard activity, and, when it detected specific trigger keystrokes, it might spring into action, perform some services for the user (eg, a calculator), and then go back to sleep. More advanced TSRs intercepted timer and idling interrupts, and split the CPU resources between multiple apps - thereby introducing a degree of multi-tasking. Or it might observe the main apps that were running, and, where relevant, alter their operation somewhat. And very many other similar examples...

I expect there were examples of "TSR" products also under DRDOS, CP/M, and on many prior environments, including many with NO "operating system".

Pounds-Shillings-Pence (LSD) \Currency, in UK and Ireland, prior to Feb, 1971:
For many years, all the currency transactions were performed in the LSD currency: 12 Pence in a Shilling, and 20 Shillings in a Pound. So, a 101 in LSD (using a ":" as a separator):

     1,234:15:6 = 1234 pounds, 15 shillings, and 6 pence
     1,234:15:6 + 7:7:7 = 1,246:3:1
     1,234:15:6 * 5 = 6,170 pounds + (75 shillings) + (30 pence)
                    = 6,170 pnds + (3 pnds + 15 sh) + (2 sh + 6 pence)
                    = 6,173:17:6
This is very similar to adding many durations (each in hours, minutes, seconds), or to multiplying a duration (say, HH:MM:SS) by a number, etc.

In the 1401, IBM could install a special hardware "LSD" currency feature, which recognised a ":" as a separator in LSD values, and would change the usual Add/Subtract/Formatting/etc operations to perform "proper" LSD arithmetic on these values.

LSD TSR on 1401!:
Well, back in Feb, 1971 (I think), the UK and Ireland changed currency from Pounds-Shillings-Pence to Pounds-Cents (decimalisation).

Within IBM then, we had hundreds of clients, with thousands of autocoder programs, and it would have been a HUGE task to change the data-fields, arithmetic, formatting, etc, in every program for the decimal currency.

So, I wrote a small 1401 "TSR"-type utility, that was placed inside the first card of every object deck. I still recall the TSR card-deck was about 8 millimeters thick, so maybe about 30-40 punched cards (of machine-code)?

I'm (now!) assuming the TSR did the following:

  1. It loaded itself into "high" (safe) memory.
  2. It then loaded the main app into low memory - as usual...
  3. The TSR then scanned all of the app memory for that ":" symbol, located all LSD values, and located all related LSD op-codes, formats, etc.
  4. It changed the values, formats, op-code addresses, etc, to implement the decimalisation mods on the machine-code in RAM, on-the-fly, just before the app started execution.
  5. Finally, it handed control to the main app.
  6. (I don't recall if it stayed in RAM, watching the operation of the main app for any reasons, or if it just "terminated").
Overall, it saved us thousands of man-hours for the "decimalisation" changeover.

There's a very small possibility that I still have that code somewhere, so I'll watch out for it - if I find it, I''ll update this note accordingly.

Well Done to the 1401 museums!

Michael [Info@KennedySoftware.ie]

If you notice any errors or omissions in the above, I’ll be delighted to make corrections accordingly.

The original of this note is at:
https://docs.google.com/document/d/1p0hFwImYIMcpRas_sKPqvsb-h8Z2TeoTfI4qaOtFvJY

[End]