Locomotive Software

Locomotive Software was a British software house founded by Richard Clayton and Chris Hall in February 1983. It provided software for the Acorn and Amstrad range of home computers, and later, the Amstrad-owned ZX Spectrum +2, +2B and +3 computers. It wrote the BASIC interpreter for Acorn's early computers, and later with Locomotive BASIC for the Amstrad CPC-range, and went on to develop Mallard BASIC for the CP/M operating system which ran on the Amstrad PCW range. In the early IBM PC-compatible era, Locomotive BASIC also shipped with Digital Research's GEM GUI (Graphical User Interface), as supplied with the Amstrad PC1512 and PC1640 PCs.The company also wrote application software, including the popular LocoScript word processor for the Amstrad PCW.

Locomotive BASIC

Locomotive BASIC was only ever used on the Amstrad CPC, where it was built into ROM. It was an ancestor of Mallard BASIC, which was an interpreter for CP/M supplied with Amstrad's PCW range and the ZX Spectrum +3.

Only two versions of Locomotive BASIC were released:

  • 1.0 was issued on ROM with the Amstrad CPC464
  • 1.1 was issued on ROM for all subsequent versions of the Amstrad range, including the CPC664 and CPC6128.

Unlike many other versions of the BASIC language of the time, Locomotive BASIC came with built-in support to handle graphics, including commands to DRAW, PLOT, INK, PAPER and FILL (v1.1 only).

It also included timer-based software interrupt commands, including EVERY and AFTER, which allowed either a timed repeating or a one-off call to a line number of your choice.

Other major features included a very complete SOUND command to control the AY-3-8912 sound chip, from selecting a single channel or combination of channels, to setting envelopes, volume, pitch and noise.

I/O control was handled in Locomotive BASIC via the GET, PUT, ERASE, SAVE, MERGE, RUN, CAT and LOAD commands.

All Locomotive BASIC commands had to be typed in full, unlike other versions of BASIC at the time which provided shortcuts for common commands or choosing symbols or colours. It required line numbers too.



LocoScript was the word processor that shipped with almost every Amstrad PCW, and was later released for the PC. At the time, it provided ground-breaking functionality, and was bootable directly on a PCW without any underlying Operating System. It was renowned for being easy to learn, and came with multi-language support from LocoScript version 2 onwards. The PCW computers came with special keys for Cut, Copy and Paste, and LocoScript made full use of these. Unlike most word processors at the time such as WordStar and WordPerfect, most commands were accessed via drop-down menus located in a menu bar at the top of the screen. To access a specific menu, the user had to press the function key for that menu. Storage was direct to Amstrad's 3" disks, the format being readable in CP/M . As with WordStar, the opening screen in LocoScript was the file manager.

In these 8-bit versions of CP/M , there was no support for directories, but each disk could support what was called 16 numbered "user areas" (0 through 15). These were essentially 16 fixed directories, with zero being the common root. LocoScript allowed the user to give meaningful names to user areas 0-7, thus providing a means to categorise files. It used areas 8-15 for deleted items, which were called "limbo" files. Deleting a file from area 0-7 moved it to the area 8 places along. This provided a facility to "undelete" should the need arise.

There was no need for file extensions in LocoScript, since it acted as the sole mechansim for disk storage, so all 11 characters were available for file naming.


CP/M Influence

CP/M + v1.0 running on a Spectrum +3" width="256"> CP/M Plus" width="120">


An Interview with Richard Clayton, co-founder of Locomotive Software

Could you tell us about the creation of Locomotive Software ?

Chris Hall and I founded it in February 1983. We were going to build an add-on board for the IBM PC (which was really new then and we much admired it, but it was too slow!). We raised some money from a Government grant to build a board centred around the National Semiconductor NS16032 (later called the 32016!). But we started the company the day we did (Valentine's Day), because we had a contract from Acorn Computers to build them a Microsoft BASIC clone to run on their add-on board for the BBC Micro.

 What was LS most important projects before Amstrad ?

The BASIC for Acorn

 What was THE most important project for LS ?

We did a lot of things, but I think the PCW was the thing we built that really changed people's lives. It was an icon of the 80s

  What was your reaction when Amstrad asked you to work with/for them ?

When Roland Perry brought round the first unit, at the end of August 1983, I opened it up -- which upset him because he'd obscured the logo on the outside case, but hadn't thought to do that on the PCB. (We were the first people who were interested enough to peek inside...)

I saw the name and didn't pay it much heed -- I thought they were Japanese :)

  What do you think of how personal computer market has evolved ?

In the games market, I'm deeply impressed by the amount of silicon used these days to get the graphics to go really fast.

  About the CPC : What did you think of the machine at the time ? And what do you think of it now ?

We thought we'd done a pretty good job and I still do

  How many time did it take to create Locomotive Basic ?

We had the main part already, from the Acorn project. All the rest (the commands that accessed the hardware and operating system (timers etc)) we built between September 1983 and very early January 1984

  Then and now, LS Basic for the CPC machine was/is considered as one of the best one ? What is, for you, the explanation ?

We were very influenced by what Acorn had done with BBC Basic but we wanted to avoid the cryptic *FX stuff as far as possible, so we added lots of keywords. We also wanted to be able to show off what the machine could do, graphics, sound etc from the BASIC, so you could get fancy things like synchronised music and movement without having to learn to program it in assembler

  Have you known any difficulty at the time with the machine ?

The hardware worked very well (Mej's firm built an emulator for the ASIC so we had something running for much of the time)

  Have you any funny memory about that time ?

We did have some problems with recording information on the tape. We had some fancy pre-compensation to get the fastest possible speeds, and we'd found it worked better if we set the pre-comp different for "0" and "1"

Then we were shipped a new unit from Japan and it stopped working. When we looked into it we found that a Japanese engineer had also spotted the difference between "0" and "1" and had fixed the circuitry to make them more identical. When we set the pre-comp the same, it all worked again!

  What do you think of that period now ?

I'm amazed we did it in the time we had

  About the PCW : What did you think of the machine at the time and what do you think of it now ?

We were very excited to build a Word Processor for that price. We had a background of building word processors when they cost 10,000 pounds each and we were going to have something better for just 300 pounds. That was just amazing

  Was it more exciting that the CPC project ?

I think the CPC was more exciting because it was first

  About your work with Amstrad : What was your relation with Alan Sugar, Amstrad or MEJ electronics ?

I only met Alan a few times and thought him a very clever man, though he tried hard to pretend that he wasn't :)

We'd known Mej for years ... he built the hardware for the 10,000 pound word processors!

  What are you most proud of ?

LocoScript 2

  Which computer company had, as far as your concerned, the best product ?

It depends when and for what market... after all the IBM PC was remarkable - just a bit slow

  About you : what is your favorite Amstrad machine ?


  What is the worst Amstrad machine ?

The 664 was squeezed by events, which wasn't entirely its fault!

  Is there any project which was not finished that you regret ?

It was a shame not to build the "Ant" -- which was going to be the games machine that shared a lot of hardware design with the PCW ("Joyce"). But we just didn't have the time and effort to do it justice so perhaps it was best that it was cancelled.

  Have you any regret about that time ?

Not enough holidays

  What do you do now ?

Currently I'm studying for a PhD in the Computer Security group at Cambridge University (yes, even at my age!)

  What do you think about people collecting old computers and especially CPC machines ?

Everyone should have a hobby :)

  What do you think of people still developping programs with your creation ?

Perhaps taking nostalgia too far ... I think you have to see these machines as being of their time, so try and view them in terms of what you could run on them back then