ArticleslgStudy

computer science

Mallard BASIC

Mallard BASIC is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Mallard BASIC rather than just read about it. In short: Mallard BASIC is a BASIC interpreter for CP/M produced by Locomotive Software. It was supplied with the Amstrad PCW range of small business computers, the ZX Spectrum +3 version of CP/M Plus, and the Acorn BBC Micro's Zilog Z80 second processor.

Key takeaways

  • Mallard BASIC belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Mallard BASIC to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Mallard BASIC from memory before moving on to harder problems.

Reference excerpt

Mallard BASIC is a BASIC interpreter for CP/M produced by Locomotive Software. It was supplied with the Amstrad PCW range of small business computers, the ZX Spectrum +3 version of CP/M Plus, and the Acorn BBC Micro's Zilog Z80 second processor.

Background In the 1980s, it was standard industry practice to bundle a BASIC interpreter with microcomputers, and the PCW followed this practice. While the PCW was primarily a dedicated word processor for business use running LocoScript, it was running on top of the CP/M operating system. There were many existing implementations of BASIC for CP/M, such as Digital Research's CBASIC and the third-party ZBasic, but they followed the earlier 1970s model of compilers that were fed source code prepared in a separate text editor. BASIC was not built-in in these cases, the user would prepare a program and then invoke BASIC to run it. In contrast, home computers of the era had moved to using BASIC as the primary interface for the machine. Instead of booting into CP/M or a similar OS, these machines booted directly into a BASIC normally stored on ROM. These also included a built-in screen editor. Mallard was based on this model, with an integrated editor that was tailored for the PCW's non-standard 90-column screen.

Content Although the PCW had excellent monochrome graphics support for its time and specification, closely comparable to the Hercules Graphics Card for IBM PC compatible computers, Mallard BASIC had no graphics support whatsoever. Instead, Locomotive Software optimised it for business use, with, for instance, full ISAM random-access file support, making it easier to write database applications. It was also optimised for speed — it is named after the LNER Class A4 4468 Mallard locomotive, the fastest steam locomotive in the world, once again displaying the company's fondness for railway-oriented nomenclature. In fact, the Locomotive Software name came from the phrase "to run like a train" and it was this theme that was used to name Mallard BASIC — no other Locomotive Software product was named after anything railway-oriented. The Acorn version was designed simply to run the Compact Software small business accounting products Acorn was including to target its Z80 second processor at small businesses. Mallard's major innovation designed specifically for Acorn was the addition of the Jetsam B*-tree keyed access filing system to give similar (but superior) features to the Miksam product Compact had originally designed around. Graphics could be implemented by loading the GSX extension to CP/M, but this was cumbersome for BASIC programmers. The lack of graphics support was rectified by several BASIC toolkits, of which the most popular was Lightning Extended BASIC (LEB — see external links). This patched Mallard BASIC, replacing the redundant LET keyword with LEB, which could be followed by a wide variety of parameters to allow sophisticated graphics (for the time) to be drawn on screen, saved to disc, printed, and so on. Probably the most widespread Mallard application ever was RPED, the text editor supplied with the PCW. The name was short for Roland Perry's EDitor, the program having been quickly written by Roland Perry, the Amstrad executive running the computer product development, when it was realised that CP/M-80 came with no usable full-screen editor, but users had a requirement to edit configuration files. The same problem was apparent with DOS Plus and MS-DOS supplied with IBM-compatible Amstrad computers, but the RPED for those machines was written in Intel 8086 assembler, and not Mallard BASIC. The IBM PC version of Mallard Basic is still available from LocoScript Software as an MS-DOS program, which will run under Windows as a disc-only version with licence or with the full Introduction & Reference manual.

See also Locomotive BASIC

References

External links Mallard BASIC Archived 2004-12-10 at the Wayback Machine – Mallard BASIC manual from the Spectrum +3 CP/M Plus package PCW: Streamlined BASIC by Geoffrey Childs, author of LEB (PCW-World, 1990)

Worked examples

Example 1 — a first encounter with Mallard BASIC

Start with the simplest possible case. Write down what Mallard BASIC claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Mallard BASIC before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Mallard BASIC ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Mallard BASIC

In research
Mallard BASIC appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Mallard BASIC in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Mallard BASIC is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC interpreters, BASIC programming language family, CP/M software, so understanding it makes those chapters shorter.
In everyday life
Look for Mallard BASIC outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Mallard BASIC” →

How to study Mallard BASIC in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Mallard BASIC means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Mallard BASIC out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Mallard BASIC in simple terms?

Mallard BASIC is a BASIC interpreter for CP/M produced by Locomotive Software. It was supplied with the Amstrad PCW range of small business computers, the ZX Spectrum +3 version of CP/M Plus, and the Acorn BBC Micro's Zilog Z80 second processor.

Why does Mallard BASIC matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Mallard BASIC?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Mallard BASIC.

Tags

  • BASIC interpreters
  • BASIC programming language family
  • CP/M software
  • ZX Spectrum software

Keep exploring