Readablewiki

City & Guilds Mnemonic Code

Content sourced from Wikipedia, licensed under CC BY-SA 3.0.

The City & Guilds Mnemonic Code was a small, study-friendly assembler language and virtual computer used in early computer courses. Introduced in 1964 by the City and Guilds of London Institute and updated in 1968, it ran on interpreters on real machines like the ICL 1900 and the Elliot 900, so students could learn programming without worrying about a specific computer. Its design emphasized simplicity and portability, and it even used floating-point numbers for data and included some advanced math and string handling.

The machine had 1,000 words of main memory and an accumulator design. The first ten addresses had special meanings (0 was always zero, 1 was the accumulator, 4 held the subroutine return address). The 1968 revision added use of 5 with the LOP loop instruction and 6–7 for character-to-number formatting with CNC. Instructions typically used two operands (n and m) and formed addresses as n+(m), combining a constant with a register value. The system used a 64-character set (0–9, A–Z and symbols), and there were no code comments or symbolic labels, so inserting or removing lines required manually updating branches. Most instructions followed the form of an opcode FF, with Q optionally indicating a query to print debugging output.

Instructions fell into three broad groups: basic math and logic operations, additional mathematical functions, and input/output. One quirky feature was the “Q” prefix, the query flag that caused the interpreter to print debugging information after executing the instruction. The format used for opcodes included an order number (FF), a possible Q, and values nnn (three digits) and m (one digit), all in decimal.

The ICL and Elliot versions differed significantly. The ICL 1968 edition expanded I/O support: one input and one output channel connected to devices such as a paper-tape reader (10), a card reader (30), magnetic tape (50), a disk (60), and a printer (80). Devices were opened with ARD n, m or AWD n, m and used via device numbers in (n+(m)). A “block” feature let you read or write strings in a single operation, ending with the block character £. The language included a printf-like formatting system stored in memory and four basic formats starting with a space and a sign. There was also a small operating environment with directives like LOAD, SAVE, ON, and GO for starting execution.

An example Elliott 903 program shows the idea by calculating and printing pi, using the PNT I/O command that wrote to punch tape.


This page was last edited on 3 February 2026, at 11:08 (CET).