A while ago I read a post about creating the smallest possible ELF executable doing something observable — printing the number 42, for example — which Linux could accept and execute successfuly. The result was 45 bytes.

This prompts a question: among retro systems which accepted batch jobs on punched cards or punched tape, has any of them had the job control language concise enough to allow a complete job on a single punched card, or its equivalent?

I have a vague recollection reading that the trick has been pioneered on IBM 1401, and such jobs were called "koans", but I was not able to find a concrete example. It would be interesting to see if the contents of the card included at least some meta-information for an operating system to parse, or just the bare machine commands for a boot loader.

How does an IBM 1401 koan look like, and were there other systems which allowed "koans"?

For an example from the other side of the Iron Curtain, a minimalistic BESM-6 batch job, using a streamed format with explicit line breaks, printing "HELLO WORLD" would look like
ШИФР 123400^ОЗУ 1^ВРЕ 1^ВХО 1^ЕВ1K000640003K000740000C0000000500000006C0070000040000000БHELLO Б WORLDЕКОНЕЦ

translated, that is

USER 123400^RAM 1^TIM 1^STA 1^ЕS1I000640003I000740000D0000000500000006D0070000040000000THELLO T WORLDЕFINIS

which would fit on a punched card in the compact (byte-based) encoding, one of the encodings accepted by the OS, that allows 120 characters per card.


  • USER: 4 digits of user ID, two digits for the job ID (arbitrary)
  • RAM: requested number of pages (1 page = 6 Kb) of RAM
  • TIM: requested time in seconds (1)
  • STA: start address (1)
  • E - end of resource section
  • S1 - start loading at address 1
  • I000640003 - instruction @1: "print" syscall, control words start at address 3
  • I000740000 - instruction @2: "terminate" syscall
  • D0000000500000006 - data @3: start (5) and end (6) address for printing, inclusive
  • D0070000040000000 - data @4: one of the 0s - text format; 70 octal - start position 56, roughly centered on a line; 4 - flag "last control word".
  • THELLO and T WORLD - data @5 and @6: text information, 6 characters per word.
  • E - end of segment introduced by S1
  • FINIS - end of job (the Russian word for "end" is 5 letters long)
  • 1
    The IBM 1620 bootloader for any load-and-go program was a single card. It was left sitting on the card reader and you'd stick it on the front of your deck. Don't know if this bootloader thing counts. You could fit 6 instructions (possibly 7?) on a single card. Possibly there were single card utilities - like print card deck to line console typewriter ... don't remember ...
    – davidbak
    Feb 11, 2023 at 2:17
  • Well, Not sure about JCL batch jobs as I would expect the m to need several cards, but a binary loader job could do useful stuff on a /360. A colleague of mine who did do service since the early 1970s had a useful test job for disk maintenance on a single card. It wold neet to be booted from in turn to select a disk drive and do a certain search pattern which could be used to adjust the head movement by just listening to it.
    – Raffzahn
    Feb 11, 2023 at 2:46
  • @davidbak If the "load and go" card would not anything interesting by itself, it does not count.
    – Leo B.
    Feb 11, 2023 at 2:50
  • @Raffzahn "Booted from" I can believe. If 80 to 120 bytes of binary on a punched tape could do quite a lot, then a capability to boot from punched cards would definitely provide for a similar functionality. I wonder if a user job submitted to an OS could be that short.
    – Leo B.
    Feb 11, 2023 at 2:55
  • @LeoB. But that means that there is for one an OS, and more important that OS is already booted. Also, that makes it arbitrary, as what a job is and what an OS is a rather blurry thing on a mainframe as applications quite often were loaded directly, being their own OS. /360 can boot (or better load, as it was called back then) from all devices that are attached to a channel. No matter if Disk, tape, punch card or whatsoever. When the load button was hit, the IOC will simply load the first block from the device selected and execute whatever is delivered.
    – Raffzahn
    Feb 11, 2023 at 3:10


You must log in to answer this question.

Browse other questions tagged .