Est. 1961 Advanced

Assembler (1401 Autocoder)

IBM's free-form macro assembler for the 1401, the decimal, variable-word-length business computer announced in 1959. Autocoder was the everyday systems language of the most widely installed computer of the early 1960s.

Created by IBM Applied Programming Department (Gary Mokotoff and John Wertheim, under Jack Palmer)

Paradigm Assembly, Imperative, Low-level (macro assembler)
Typing None (untyped); data is variable-length fields delimited by word marks
First Appeared 1961
Latest Version Autocoder (on Tape), program 1401-AU-037 Version 3 is the level preserved in surviving listings; last language manual C24-3319-0 (November 1964)

1401 Autocoder was IBM’s symbolic assembly language for the IBM 1401 Data Processing System, the transistorized business computer IBM announced on 5 October 1959. By the mid-1960s, according to the Computer History Museum, nearly half of all computer systems in the world were 1401-type systems. Autocoder was the main language in which that machine was programmed. It had mnemonic operation codes, symbolic addresses, literals, and a macro system that could expand one line into dozens or hundreds of instructions. Programmers wrote payroll, billing, inventory and tape-handling programs in it on Autocoder coding sheets, one punched card per line. It is also one of the stranger assembly languages. The 1401 has no registers for arithmetic, no fixed word size and no binary arithmetic: memory is a string of decimal-addressed characters, and each field ends at a word mark.

History & Origins

The name before the machine

“Autocoder” was an IBM brand before the 1401 existed. The first Autocoders were free-form assemblers for the IBM 702 (released around 1955) and the 705 (1956), designed by Roy Goldfinger. David Salomon’s Assemblers and Loaders (1993) credits them as apparently the first assemblers with a macro facility. The name, like the British term “autocode,” comes from the 1950s idea of “automatic coding.” IBM went on to produce separate Autocoders for the 7070, 7080, 1410/7010 and 7030 Stretch. 1401 Autocoder is the best known of the family.

SPS first

The 1401 was announced with a different assembler. Jack Palmer, who managed 1401 and 1620 systems software in IBM’s Applied Programming Department in New York, wrote in 2009 that the machine was announced in October 1959 with 1,400, 2,000 and 4,000 characters of storage. It needed an assembler that could run on the smallest configuration: 1,400 characters and cards only, no tape. The machine’s likely customers were users of punched-card accounting machines who were used to fixed card fields. The result was the Symbolic Programming System (SPS), a fixed-form assembler with label, operation, two operands and remarks in fixed columns. Gary Mokotoff, who joined IBM in June 1959 at 22, was the sole author of SPS-1 (1,400 characters) and SPS-2 (4,000 characters). According to Palmer, SPS-1 was available when the first manufactured 1401 shipped in September or October 1960.

The switch to Autocoder

Palmer’s group planned a larger fixed-form SPS 3 that would use magnetic tape, accept literals, and take advantage of the 8,000- and 16,000-character models IBM had since announced. Many 1401s, however, had been ordered as I/O processors for IBM 700/7000-series installations. Their users had been writing free-form Autocoder for up to three years, and they wanted macros, which a fixed-form layout could not support. Palmer recalled that at a user-group meeting that autumn, SHARE president Frank Verzuh objected strongly to SPS 3 and took his complaint to Palmer’s manager, Arnold S. Wolf. James H. (Jim) Frame of IBM’s Endicott laboratory, who had worked on 7070 and 1410 support, argued that the small machines should follow the Autocoder tradition of the larger ones. Wolf agreed and redirected the SPS effort. Palmer describes this as “the birth of 1401 Autocoder.”

Mokotoff and John Wertheim wrote the new assembler. Palmer notes that IBM ran a customer Datacenter with a 1401 in the basement of the Time & Life Building, the same building as their 10th-floor office. Wertheim gave its operators early versions to run overnight, picked up the problem reports each morning, and delivered a fixed system tape by evening. The first version was written in SPS. Partway through, the program was converted so that the finished Autocoder was written in its own language. A console switch let it accept SPS source and convert it to Autocoder. Palmer could not remember when Autocoder reached customers and estimated “sometime in mid-1961.” The earliest Autocoder specification preserved on Bitsavers, bulletin J24-1434-2, is a 1961 revision that replaces two earlier documents.

On the date: this encyclopedia’s master list gives 1959 for this entry. That is the year the 1401 and SPS were announced. Autocoder was designed in 1960 and released around 1961, so this page uses 1961.

Design Philosophy

The 1401 Autocoder bulletin describes the language as one that “supplements and extends, but does not replace” SPS. Its design followed three ideas:

  • Free-form operands. SPS gave the A-operand, B-operand, address adjustment, index and d-character their own columns. Autocoder has a single operand field (columns 21–72) with the parts separated by commas, such as MCW NAME,PRINT+20. That change made room for literals, expressions and macro parameters.
  • Let the processor do the bookkeeping. Literals, area-defining literals and LTORG let programmers write constants and work areas where they are used and leave the processor to assign their storage.
  • Macros as the way to use system services. Programs normally reached IBM’s standard routines, above all IOCS, through macro instructions stored on a library tape and tailored to each call. Daniel McCracken’s A Guide to IBM 1401 Programming (preface dated March 1962) said this “characteristic makes Autocoder a compiler rather than an assembler as SPS is.”

The cost was hardware. Autocoder (on Tape) needed a 1401 with at least 4,000 characters of storage, four IBM 729 or 7330 tape drives, a 1403 printer, a 1402 card read-punch, and the Advanced Programming and High-Low-Equal Compare features. Many small card-only 1401s could not run it, so their owners kept using SPS.

Key Features

A machine without words

Autocoder is shaped by the 1401 underneath it:

AspectIBM 1401
Storage1,400 to 16,000 characters of core in six sizes, addressed in decimal (0–15999)
Character6 data bits (BCD digit plus two zone bits), a word mark bit and a parity bit
FieldsVariable length. Instructions process a field from its low-order (rightmost) character leftward until they reach a word mark
Instructions1 to 8 characters: a one-character op code, up to two 3-character addresses and an optional d-modifier
ArithmeticDecimal only, on fields of any length. Multiply and divide were optional features
Index registersThree 3-character “index locations” in ordinary memory (positions 87–89, 92–94 and 97–99), part of the Advanced Programming feature

Because data lengths are set by word marks and not by the instruction, the same A (Add) works on a 3-digit field or a 30-digit field. Setting word marks (SW, DCW, LCA) is a large part of 1401 programming. Ken Shirriff wrote in 2015 that when writing Autocoder, “the hardest part was thinking about word marks.”

Mnemonics and the machine codes behind them

Autocoder mnemonics translate to the 1401’s single-character op codes:

AutocoderMeaningMachine op
A, SAdd, SubtractA, S
ZA, ZSZero and Add, Zero and Subtract?, !
M, DMultiply, Divide@, %
MCW, MLCMove characters to word markM
LCALoad characters (with word marks) to A-field word markL
MCEMove characters and editE
C, BE, BH, BL, BUCompare, then branch on equal/high/low/unequalC, B + d-character
SW, CSSet word mark, clear storage,, /
R, W, PRead a card, write (print) a line, punch a card1, 2, 4
HHalt.

Many branch mnemonics are a single machine B plus a d-character. For example, BE is B with d-character S, and BLC (branch on last card) is B with A. The mnemonic spares the programmer from memorizing modifier characters.

Declaratives, literals and control statements

  • Declaratives: DCW (define constant with word mark), DC, DS (define symbol), DSA (define symbol address), DA (define area, including multi-record I/O areas) and EQU.
  • Literals: numeric (+10) and alphameric, enclosed in @ signs (@JANUARY 28, 1961@). According to the 1964 manual, “in SPS, literals were not permitted.”
  • Area-defining literals create and name a work area inside an operand.
  • Address adjustment and indexing: FICA-10, TABLE+X1, *+8, with adjustments up to ±999.
  • Processor control: JOB, CTL, ORG, LTORG, EX (execute during loading), XFR, SFX (a suffix character added to short labels so sections can reuse names), ENT and END.

The macro system

Macros lived on a library tape built by the processor’s librarian phase. A macro instruction in the source pulled in a model routine and tailored it with the programmer’s parameters. The 1964 manual lists six IBM-supplied macros: CALL (link a closed routine), INCLD (include one inline), CHAIN (generate chained instructions), MA (modify address), and OVLAY/TOVLY (program overlays). IOCS added DIOCS, DTF, OPEN, CLOSE, GET and PUT. Sites added their own macros. IBM’s program catalog includes, for example, contributed binary-search and table-lookup macros for 1401 Autocoder.

A small example

The program below clears the 1403’s print area (storage positions 201–332), moves a literal into it and prints one line. The layout follows Autocoder coding-sheet columns: label from column 6, operation from column 16, operand from column 21. CS 332 clears the hundred-character block 300–332 down to 300. The following CS with no operand is chained: it reuses the address left in the B-register and clears 200–299. The CTL control card describes the machine configuration to the processor; the value shown is the one Ken Shirriff used for the museum’s 1401 in 2015.

1
2
3
4
5
6
7
8
9
               JOB  HELLO WORLD
               CTL  6641
               ORG  333
     START     CS   332          *CLEAR PRINT AREA 300-332
               CS                *CHAINED: CLEAR 200-299
               MCW  @HELLO, WORLD@,212
               W                 *PRINT POSITIONS 201-332
     FINIS     H    FINIS        *HALT
               END  START

MCW moves characters right to left. The 12-character literal ends at position 212, so it lands in 201–212, and the move stops at the word mark the processor places on the literal’s high-order character. The 1403 printed upper case only. Assembly produced a self-loading object deck, with up to seven instructions or constants per condensed card, plus a listing.

Evolution

  • Autocoder (on Tape), 1401-AU-037. The main version, revised through at least Version 3. The November 1964 manual C24-3319-0 replaced earlier separate language (C24-1434-0) and operating (C24-3104-0) manuals and covered the 1401 and the IBM 1460. On a 1460, the processor required 8,000 characters.
  • Autocoder (on Disk). A separate processor for 1401, 1440 and 1460 systems with IBM 1311 disk drives (manuals C24-3258 and C24-3259). The 1964 tape manual says the tape processor lacks mnemonics for 1311 and 1301 disk operations and points disk users to the disk-based Autocoders. Later descriptions call the disk version similar to, but not compatible with, the tape version.
  • Basic Autocoder 2K. A reduced Autocoder for small 1401s, as the name suggests (manuals C24-3170 and C24-3262). According to IBM’s 1967 bibliography it used the same coding sheet as full Autocoder.
  • Cross-assemblers. Other machines also assembled 1401 Autocoder. Bell Labs’ PEST on the 709/7094, for example, accepted a subset of the language.

IBM’s 1401/1410/1440 Autocoder coding sheet (form X24-1350) was shared across the 1400 series. The 1410 and 7010 had their own, larger Autocoders. Competitors echoed it too: Honeywell named the assembler for its Honeywell 200, a machine built to take business away from the 1401, Easycoder, a name that, as Wikipedia notes, resembled IBM’s Autocoder.

The System/360, announced in 1964, used a new architecture and a new assembler, and IBM withdrew the 1401 on 8 February 1971. 1401 programs did not disappear with the hardware: IBM used microcode emulation so that some System/360 models could run 1401 programs. Wikipedia notes that IBM installed many 1401s in India and Pakistan in the 1970s, where they remained in use into the 1980s.

Performance in Context

The 1401’s storage cycle was 11.5 microseconds, about 87 kHz according to the Computer History Museum’s 1401 guide. Every internal instruction takes a whole number of cycles, and the count depends on how many characters the instruction and its fields contain. Tom Van Vleck recalls that adding two five-digit numbers took about 20 cycles, or roughly 4,000 such additions per second. Two modern benchmarks show the gap:

  • Mandelbrot set, 2015. Ken Shirriff’s Autocoder program uses fixed-point decimal arithmetic scaled by 10,000, and up to 24 iterations per point. It printed a 60-line by 132-column Mandelbrot image on the Computer History Museum’s 1401 and 1403 printer in about 12 minutes.
  • SHA-256, 2015. His Autocoder implementation of Bitcoin’s hash took about 80 seconds per hash on the same machine. For comparison, he cited a roughly $50 USB ASIC miner doing about 3.6 billion hashes per second. He pointed out that the gap is partly Moore’s law and partly the cost of emulating 32-bit binary operations on a decimal business computer.

Current Relevance

1401 Autocoder is Historical: nobody writes production code in it, and IBM has not supported it for decades. It is still easy to try:

  • Primary documents are online. Bitsavers has the 1961 specification bulletin, the 1964 tape manual, the disk and Basic Autocoder manuals, and a scanned listing of the Autocoder processor itself.
  • The original assembler survives. Van Snyder keyed in the Version 3 source listing from an IBM customer-engineering manual lent by Dick Weaver. He assembled it with his own Fortran 90 Autocoder assembler and compared the output with an original distribution deck on tape. He also transcribed eleven modification letters.
  • Modern tools. ROPE/1401 (Ron Mak, 2005) combines Snyder’s assembler with the SIMH i1401 simulator in a small IDE. A copy of the Fortran assembler is also on GitHub under the IBM-1401 organization.
  • Real hardware. The Computer History Museum opened its IBM 1401 Demo Lab in November 2013, with two systems restored by volunteers. Museum volunteers and visitors such as Ken Shirriff have written new Autocoder programs, tested them in ROPE and run them on the restored hardware.

Why It Matters

1401 Autocoder brought macro-assembler programming to a very large number of commercial programmers. Before it, symbolic assembly with macros and literals was mostly available on large 700/7000-series installations. The 1401, installed in far larger numbers than those machines, brought it to much smaller organizations. The language’s history also shows early user influence: SHARE members and IBM’s own Endicott engineers pushed IBM to replace a fixed-form assembler with a free-form macro assembler, because users would not give up macros once they had them. Its people carried on as well: Autocoder co-author John Wertheim went on to manage IBM’s BPS, BOS, TOS and DOS programming efforts for System/360.

Timeline

1955
IBM releases the first Autocoder, a free-form symbolic assembler, for the IBM 702 (around 1955). A version for the IBM 705 follows in 1956. Roy Goldfinger designed both
1959
IBM announces the 1401 Data Processing System on 5 October. Its assembler is the fixed-form Symbolic Programming System (SPS), written by Gary Mokotoff, who had joined the team in June 1959
1960
The first production 1401 ships in September or October with SPS-1. Later in 1960, by Jack Palmer's account, objections from SHARE's president Frank Verzuh and from Jim Frame in Endicott lead IBM to replace the planned SPS 3 with a free-form 1401 Autocoder
1961
IBM publishes the Autocoder Specifications bulletin for Applied Program 1401-AU-037. Its third edition, J24-1434-2, carries a 1961 copyright. Palmer later put the program's release to customers at around mid-1961
1964
IBM publishes C24-3319-0 in November. Titled Autocoder (on Tape) Language Specifications and Operating Procedures, IBM 1401 and 1460, it combines the earlier language and operating manuals into one
1971
IBM withdraws the 1401 from marketing on 8 February
1985
Gary Mokotoff donates the source programs of SPS-1, SPS-2 and 1401 Autocoder to the Charles Babbage Institute at the University of Minnesota
2005
Ron Mak releases ROPE/1401 version 0.1 on 24 January. The IDE combines Van Snyder's Fortran reimplementation of the Autocoder assembler with the SIMH 1401 simulator
2013
The Computer History Museum opens its IBM 1401 Demo Lab on 20 November. It has two 1401 systems restored by a team of about 20 volunteers over ten years
2015
Ken Shirriff runs new Autocoder programs on the museum's 1401: a Mandelbrot set in March and a SHA-256 Bitcoin hash in May

Notable Uses & Legacy

Autocoder itself

Mokotoff and Wertheim first wrote the processor in SPS, then switched partway through so that the final version was written in Autocoder. A surviving IBM listing, headed '1401 AUTOCODER-PASS I-GENERATE SYSTEM TAPE-VERSION 3', shows the assembler written in its own language, with MACRO sections included.

IOCS tape processing

IBM's Input/Output Control System was used through Autocoder macro instructions: DIOCS and DTF to describe the machine and its files, and OPEN, CLOSE, GET and PUT to process them. Each of these single statements handled record blocking, tape labels and end-of-reel handling that would otherwise take many hand-written instructions.

Swift & Company

Tom Van Vleck recalls a summer job in the Operations Research department at Swift & Company in Chicago. It ran two 12K 1401s that handled work such as payroll and dividend checks, and he wrote Autocoder there with the Autotest debugger and his own library of tape error-recovery code.

Bell Labs PEST and MIT Project MAC

Bell Labs' Peripheral Equipment Symbolic Translator (PEST) was a cross-assembler for a subset of 1401 Autocoder that ran on the 7094. Van Vleck later wrapped it as a CTSS command at Project MAC, which let him write and assemble 1401 programs online without keypunching.

Computer History Museum 1401 Demo Lab

Volunteers at the museum write new Autocoder programs, test them in ROPE, and then run them from punched cards on restored 1401 hardware. Ken Shirriff's 2015 Mandelbrot and Bitcoin-hash programs were developed and run this way.

Language Influence

Influenced By

IBM 1401 SPS IBM 705 Autocoder

Running Today

Run examples using the official Docker image:

docker pull
Last updated: