Welcome to the Datatron 205 and 220 Blog

This blog is a companion to T J Sawyer's Web Page that outlines the history of the Burroughs Datatron 205 and Paul Kimpel's incredible 205 and 220 emulators. Please visit those sites and return here to post any comments.

Friday, March 27, 2015

The Mighty CARDATRON

The 1950s through the 1970s were the age of punched-card interfaces for computer systems. Their use started to fall off in the 1980s, and by the early 1990s punched cards were more or less extinct. During their time, though, at least in the United States, punched cards and their related equipment were the primary (and sometimes the only) interface between people and the computer.

This is Paul Kimpel again, with another update on the development of the retro-205 emulator for the ElectroData/Burroughs Datatron 205. The past two months have largely been devoted to implementing a punched-card and line-printer interface for the emulator. This is a large subject. A combined introduction to the punch-card facilities of the Datatron and a description of their implementation in the retro-205 emulator is too long for one post, so I have split it into two parts.

This first part briefly discusses the development of I/O interfaces for the Datatron, introduces the punched-card equipment it used, and describes how punched-card I/O was handled. The second part, to be published within the next couple of days, will describe how punched-card support has been implemented in the retro-205 emulator.

Background


The earliest models of the Datatron computer system, the Consolidated Electrodynamics 201 through the ElectroData 203, supported so-called "Console I/O" -- input from punched paper tape and output to paper tape or the Flexowriter typewriter. It was termed Console I/O because the data went through the desk-sized Control Console, which contained relay-based circuits to route and synchronize the signals between the Processor and peripheral units. It was slow, and the preparation and editing of paper tapes was cumbersome.

The first punched-card interface for the Datatron was a device known as the Punched Card Converter. This was a very basic device, handling only numeric data from and to cards. It stood between the Datatron Processor and up to two IBM punched card machines, one for input and one for output:
  • For input, the IBM Type 514, 523, or 528 punches and reproducers
  • For punched-card output, also the IBM Type 514, 523, and 528
  • For printed output, the IBM Type 402 tabulator or 419 numerical accounting machine
The Punched Card Converter offered no buffering of the data, so the Processor was stalled while the IBM machine was in operation, and throughput suffered accordingly. It also had little formatting or data conversion capability. There were knobs to control the number of words per card read on input or punched/printed on output, but that was it. A more capable interface to IBM machines was needed.

ElectroData eventually produced that more capable interface, calling it the CARDATRON, apparently in consonance with the DATATRON name of its host system. ElectroData seemed to prefer these names in all capitals, but in the rest of this post I'll capitalize just their first letters.

Cardatron Architecture


The Cardatron first appeared ca. 1956, about the time that Burroughs acquired ElectroData. As mentioned above, system models through the 203 used Console I/O and, later on, the Punched Card Converter. A 204 was a 203 with the necessary changes to support magnetic tape. A 205 was a 204 with additional changes to support the Cardatron. The Cardatron worked well enough that it was carried forward essentially unchanged to the 205's successor, the Burroughs 220.

Like the Punched Card Converter, the Cardatron stood between the Processor and a number of IBM punched-card machines. Unlike the earlier interface, it could connect a maximum of seven card machines in any combination of input and output devices. The machines supported were:
  • For input, the IBM Type 087 and 089 collators, or the 523 summary punch
  • For punched-card output, the IBM Type 523 (although the same machine could not be used for both input and output)
  • For printed output, the IBM Type 407 tabulator
The Cardatron had two main functions:
  1. Buffering. The 205 was not that fast, but the IBM machines were considerably slower. The 087 and 089 could read at 240 cards/minute (twice that if merging from both input hoppers), the 523 could read or punch at 100 cards/minute, and the 407 could print at 150 lines/minute. Buffering allowed the 205 Processor to continue executing while the Cardatron drove the IBM machine asynchronously. Only one card image or print line per machine could be buffered at a time.
  2. Formatting. The 205 had an 11-digit word. That word could hold a signed 10-digit number or five alphanumeric characters at two digits per character. The 205 had little in the way of character-level manipulation, just digit-wise shift/rotate and an Extract instruction that could do digit-wise masking operations somewhat like logical AND. The Cardatron provided the mechanism to take variably-sized numeric and alphanumeric fields on the card and map them to full words in the 205 memory, discarding unwanted zones or whole columns from the card, supplying zero digits to left- or right-justify fields in memory, and mapping a zone punch to the sign digit in memory. To accomplish this, it used a set of programmable format bands that were loaded into the Cardatron from the Processor.
A Cardatron system consisted of a Control Unit and any combination of up to seven Input or Output Units. Each unit occupied a full-size cabinet. Each Input or Output Unit controlled one IBM card machine.

The Control Unit provided the data path to the Processor and a switching network to select individual Input and Output Units. The unit was selected by the value of the third digit in an I/O instruction word. See the section "Cardatron Instructions" below for details on the instruction word formats and the additional digits in those words used to control Cardatron I/O.

The Processor could transfer data to or from only one unit at a time, but once the relatively fast data transfer was completed between the Processor and Cardatron, the Input or Output Unit drove the IBM machine asynchronously. Thus, it was possible for the Cardatron to have multiple simultaneous operations in progress with the card machines at a time.

Each Input or Output Unit contained a small drum that rotated at 21,600 RPM. The drum had six read/write tracks, or bands that could hold 316 digits each (slightly less than 29 11-digit words). Additional read-only tracks provided timing signals to the unit. The first of the six bands was used to buffer data going to or from the card machine. The remaining bands, numbered 1 through 5, were used to store strings of formatting codes.

A card image or print line was transferred between the card machine and the Processor under control of one of the format bands. On output, the band was selected by the second numeric digit in the CDW (54) instruction word. On input, however, the format band was selected by a punch on the card being read. This approach was somewhat controversial, as it required the customer to plan their card layout around the need to reserve one column for format control. The column containing the format punch was designated by a manual setting in the Input Unit. Columns 1, 2, and 80 were apparently the most common choices.

An Input Unit had two further capabilities:
  • Fixed Format Bands. There were two additional pseudo bands. These bands were not stored on the drum, but were hard-wired in the Cardatron Input Unit's logic. Format 6 was an all-numeric format that could read up to seven full 11-digit words plus a partial three-digit word from a card. It was typically used for loading object programs or raw data into the system. Format 7 was "reject format." The data from the card was not passed to the Processor, and the Input Unit automatically proceeded to read the next card.
  • Reload Lockout. If the second digit (called the "k-digit") of the CDR (44) instruction was odd, the Input Unit was placed in a "reload lockout" condition. The data from the card was transferred to the Processor, but the data remained on the Input Unit's buffer drum and the next card was not fed from the card machine. This feature was generally used in one of two ways:
    • To reread the same data into a different starting address on the memory drum.
    • To hold the data on the buffer drum while the format band was reloaded, so that the data could be read again under a different format.
Reload lockout was released once a CDR (44) or CDRF (48) was executed with an even value in the k-digit of the instruction word.

Additional control over data formatting could be accomplished through wiring of the plugboards in the IBM machines. ElectroData and Burroughs had standard plugboard configurations that transferred all columns of a card or line of print as is, but some sites developed their own plugboard wiring to satisfy special requirements.

Cardatron Formatting Facilities


The first concept behind Cardatron formatting and data conversion is that the I/O took place in two phases:
  • For input, the first phase asynchronously read a card and transferred its data to the data band on the buffer drum. The second phase transferred the data from the buffer drum to the Processor when the Processor requested it by executing a CDR (44) instruction. Note that this meant the Input Unit generally read the card asynchronously before the Processor asked for its data.
  • For output, the first phase transferred the data from the Processor to the data band on the buffer drum under control of a CDW (54) instruction and released the Processor for further execution. The second phase asynchronously transferred the data from the buffer drum to the card machine.
The data transfer in both phases was controlled by the digits of the selected format band. Transfer between the Input or Output Unit and the Processor was limited by the speed of rotation of the unit's buffer drum, or one word per 2.78 ms. That rate could be achieved when transferring data to or from one of the high-speed memory loops, which had an average access time of 0.84 ms, but otherwise the rate was controlled by the average access time to main memory, 8.4 ms. A single I/O typically transferred 10-20 words, so even transfers to and from main memory took less time than the fastest card machine cycles.

The second concept behind Cardatron formatting is that each column on a card or line of print was divided into two parts, a numeric digit and a zone digit. The Cardatron allowed you to copy digits, delete digits, and insert zero digits in the path between the card machine and the Processor.

A standard punched card consisted of 80 columns and 12 rows. From the top of the card, these are known as the 12, 11, and 0-9 rows. The numeric portion of a column is considered to be the bottom nine rows, 1-9. The zone portion of a column is considered to be the top three rows, 12, 11, and 0. For numeric data, a negative number was generally indicated by an 11 punch over the leading digit of the field, and a non-negative number was generally indicated by a 12-punch or no zone punch at all.

As an Input Unit was reading a card, it split each column into the numeric and zone halves, and then encoded each half so that one column occupied two (not necessarily contiguous) digits on the buffer drum. An Output Unit took one or two digits from the buffer drum (as controlled by the format band) to produce one column for punching or printing on the card machine. The actual process was a little more complex than that, but the central idea is that the numeric and zone portions of a column on the card machine were stored and manipulated as separate digits on the buffer drum. The conversion process and encoding of digits on the buffer drum are detailed in United States Patents 3,000,556 (September 16, 1961, L.L. Bewley et al) and 3,072,328, (January 8, 1963, L.L. Bewley et al).

The third concept behind Cardatron formatting is that each data digit on the buffer drum was paired with the corresponding format digit on the selected format band. Thus the handling of data digit 1 was controlled by format digit 1, data digit 2 by format digit 2, and so forth. Not all data digits were necessarily associated with columns on the card -- digits could be deleted and zero digits could be inserted into the data stream as determined by the format band digits.

Digits on the data band could have the values 0-9, 11, and 12. Those last two values where used to encode multiple punches in the numeric part of a column for certain special characters, e.g., 11-3-8 for "$". Digits on the format bands were restricted to values 0 to 3. The formatting digits were interpreted somewhat differently for Input and Output Units. For an Input Unit, format digits mapped the numeric and zone digits coming from the card to digits in the destination computer word as follows:
  • 0 caused a 0 digit to be inserted in the corresponding data digit position on the buffer drum. The 0 digit was inserted on the drum before the next digit coming from the card. In effect, this code caused a padding zero digit to be inserted into the computer word.
  • 1 caused the numeric or zone digit coming from the card to be recorded in the corresponding data digit on the buffer drum. The digit was not simply copied, but encoded in a special way as described in Patent 3,000,556. In effect, this copied the digit to the computer word, but a transformation took place for alphanumeric data to account for the numeric/zone representation of characters on a card vs. the two-digit alphanumeric coding used internally by the 205. Generally, though, two 1 digits in succession transferred one alphanumeric column from the card to the computer word.
  • 2 caused the numeric or zone digit coming from the card to be dropped and replaced by a 0 digit in the corresponding data digit on the buffer drum. This code is effectively a combination of format digits 1 and 3. In effect, this code replaced the digit coming from the card with a zero in the computer word.
  • 3 caused the numeric or zone digit coming from the card to be dropped. In effect, this code prevented storing the digit coming from the card in the computer word.
For an Output Unit, data digits coming from a computer word are mapped to numeric and zone digits for a card or print column, and the format digits operated as follows:
  • 0 caused a 0 digit to be inserted in the corresponding data digit position on the buffer drum. This digit was inserted before the next digit coming from the computer word. In effect, this code caused the corresponding numeric or zone portion of a column to have no punch. Two 0 codes in succession generally resulted a blank column on output.
  • 1 caused the digit from the computer word to be recorded in the corresponding data digit on the buffer drum. As with input, a special transformation occurred to handle the differences between the internal 205 alphanumeric coding and card numeric/zone coding, as described in Patent 3,072,328. In effect, this code copied the digit from the word to the corresponding numeric or zone position in the next card column. Generally, two 1 digits in succession transferred one alphanumeric character from the computer word to the card or print line.
  • 2 caused one digit from the computer word to be stored in the corresponding data digit on the buffer drum such that it would be punched/printed as one numeric column on the output device. In effect, this code caused the digit from the computer word to generate both a numeric and zone code for the output column. The behavior of this code, as opposed to a 3-1 combination, was designed to supply a 0 punch for a 0 digit, which would not normally happen for format digit 1, since strictly speaking 0 is a zone punch, not a numeric punch.
  • 3 caused the next digit from the computer word to be dropped. This was often used to strip leading numeric zeroes from a computer word so that either a shorter field could be formatted on the output device, or the zone punch for the sign digit could be properly positioned, or both.
The next characteristic of Cardatron formatting, and a highly unusual one, is that data and format digits on the buffer drum mapped to columns on the IBM machine backwards. That is, data and format digit 1 corresponded to the numeric portion of column 80 on a punched card, or the last print position on the printer. The reason for this may be that during input, digits coming from the Cardatron entered the sign position of the Processor's D register and were shifted right; on output, digits going to the Cardatron exited the low end of the A register and were also shifted right. Starting at the end of the card made it somewhat easier to deal with leading zeroes in words and to position the sign digit properly.

Another characteristic of Cardatron formatting was that, since data in the Input or Output Unit was processed in reverse order, but words were fetched or stored on the memory drum in ascending order, fields on the card were mapped in reverse order to words in memory -- the last field on the IBM machine was at the first address in memory. This may be counter-intuitive, but since both input and output worked the same way, words came into the system and went out in the same relative order. The reverse ordering of fields also meshed well with the indexing and decrement-and-branch behavior of the B register.

The way these format digits interacted with card or print columns can be difficult to envision from a brief description such as the foregoing. A small example might help illuminate how it worked. Since Cardatron formatting worked from right to left on the card, we'll just consider a couple of fields at the end of a card:
  • Columns 72-76 contain a five-digit numeric field with the sign indicated by a zone punch over column 72.
  • Column 77 is not used.
  • Columns 78-80 are a three-character alphanumeric field.
Thus, the last portion of the card could be visualized as the following string, where S is a signed numeric digit, N is an unsigned numeric digit, X is an ignored column, and A is an alphanumeric column:

...SNNNNXAAA

We want the alphanumeric field to end up left justified over spaces in one word of main memory and the numeric field to be right-justified over zeroes in the next word. Since the data is read backwards, if the CDR (44) instruction specifies address 4000, the alphanumeric field will be stored in 4000 and the numeric field will be in 4001.

The following digits in the format band will do this transformation between the card columns and computer words, again reading from right to left. The vertical-bar characters (not part of the format band coding) show where word boundaries in memory will coincide with the format digits:

...|100000131313131|3301111110000|

  • The four 0 digits on the end simply shift four zeroes into the D register starting from the sign (left-most) digit and moving to the right. The internal 205 code for a space is 00, so this inserts the two spaces necessary to left-justify the three-character alphanumeric field in its computer word. 
  • Next, the six 1 digits alternately copy the numeric and zone digits from the last three columns on the card and shift those into the D register as well, pushing the spaces to the right. The codes for the numeric and zone digits undergo transformations going from the card to the Cardatron buffer drum and from the buffer drum to the D register in order to translate the characters to internal 205 character codes. 
  • Then the 0 in the format band shifts in a 0 for the sign digit, completing the first word, which will be stored at location 4000 in the 205's memory. 
  • The 33 digit pair deletes the numeric and zone codes for the unused column 77 on the card. 
  • Next, the four pairs of 31 format digits alternately copy the numeric portions of card columns 73-76 and discard the zone portions. This shifts the low-order four digits of the numeric field into the D register. 
  • The next 1 digit copies the numeric portion of card column 72 to the D register. 
  • The five 0 digits shift as many zeroes into the D register. The purpose of these 0 digits is to right-justify the number in the word. We now have ten digits shifted into the D register. 
  • The final 1 digit shifts the zone from the card column 72 into the sign digit, completing the word that will be stored at location 4001.

Unfortunately a good publicly-accessible reference for the 205 Cardatron is not presently available. A quite usable description, however, can be found in Section 6 of the Burroughs 220 Operational Characteristics manual, available at:

http://bitsavers.org/pdf/burroughs/electrodata/220/5020A_B220_OperCharac_Aug60.pdf.

Format band coding had to be prepared by the programmer and loaded into the 205's drum memory. All 11 digits of a word were used to store the format band digits, so the 316 digits of a band required 29 words in memory. Sign-digits in the data other than 0 or 1 had special meaning during input from an I/O device, however, and format band data typically had 2s and 3s in the sign digits of their words, so special handling was required to load programs that contained format bands.

During input from Console and Cardatron devices, the sign digit of the words being read were examined before being stored in memory and acted upon as follows:
  • Digits 0, 1, 8, 9 -- word is stored normally with the sign digit as is.
  • Digit 2 -- the current contents of the B register are added to the word and the sign digit is replaced by 0 before the word is stored in memory. B-register modification was typically used to adjust relocatable addresses in instruction words.
  • Digit 3 -- same as Digit 2, except the sign digit is replaced by 1 before the word is stored in memory.
  • Digit 4 -- the word is not stored in memory, but is transferred to the C register and then executed as an instruction. For Cardatron input, the op code in the word must be 44 for CDR (alas, the documentation does not say what happens if the op code was anything else). The input operation continues with the next word from the device. Words with this sign digit were typically used to change the address at which the following words would be stored.
  • Digit 5 -- same as Digit 4, except the B register is added to the word before it is transferred to the C register and executed.
  • Digit 6 -- the word is not stored in memory, but is transferred to the C register and then executed as an instruction. Unlike the action for Digits 4 and 5, a word with this sign digit caused data transfer from the device to stop and the I/O operation to be terminated. The word could contain any op code, but most frequently it was an unconditional branch (20) or another input command.
  • Digit 7 -- same as Digit 6, except the B register is added to the word before it is transferred to the C register and executed.
This modifying behavior of sign digits in a data input stream was an interesting idea, and permitted control over an I/O operation somewhat like the channel programs for the IBM 709 and later systems. The differences with the 205 approach were that the I/O commands were embedded in the data itself instead of being stored separately, and that the words could be modified by the contents of the B register before being stored in memory.

Note that words with sign digits having values of 2 or 3 normally caused the input word to be modified by the B register and the sign digit to be changed to a 0 or 1. This is something you definitely do not want to have happen to a format band as it is being loaded into memory, so some overrides to the default behavior were necessary.

For input from Console devices, there was a switch on the Sub-Maintenance panel that could be set to suppress the interpretation of signs in the data stream. The retro-205 emulator does not presently implement this switch.

For input from Cardatron devices, the second digit (k-digit) of the CDR (44) instruction word could be used to control the interpretation of sign digits in the words being read. If the high-order bit in the word was set, then B-register modification of input words with signs 2, 3, 5, and 7 was suppressed, and signs of 2 or 3 were stored as is. Note that the low-order bit of the k-digit still controlled reload lockout.

For an example of how sign digits in words coming from the Cardatron could control and redirect data during an I/O, see this analysis of a small, three-card program that clears the 205 memory drum:


Note that this program uses the hard-wired format band 6, which acted as if it consisted (right-to-left) of 80 pairs of 31 digits, preceded by 154 0 digits to fill out the format band. This band will transfer 14 words of data to the 205 memory, unless the transfer is stopped sooner by a sign-6 or -7 instruction word (which would normally be the case).

Cardatron Instructions


There were six instructions in the 205 Processor for commanding the Cardatron. In the following discussion, "s" is the sign digit, "r" is the relay-designate digit, "k" represents the k-digit discussed above, "u" is the Cardatron unit number (1-7), "p" is the standard breakpoint control digit, "x" is a digit that is ignored, and "aaaa" is the effective address of the instruction, which may be modified by the B register if the sign digit in the instruction word is odd.

CDR: Card Read (s xkup 44 aaaa)
Read words from Input Unit "u" to memory starting at address "aaaa". The k-digit may indicate reload lockout or sign-handling override. The number of words read is determined by the format band selected by the card, but that number may be reduced if the incoming data contains a word with a sign of 6 or 7.
CDRI: Card Read Interrogate (s xxup 45 aaaa)
Interrogate the status of Input Unit "u". If a card has been read and the unit's buffer drum is loaded and ready to transfer data to the Processor, branch to "aaaa" after clearing the R register and storing the current control counter in the high-order four digits of R. If the buffer is not loaded and ready to transfer data, continue with the next instruction in sequence.
CDRF: Card Read Format (s xkup 48 aaaa)
Load a format band on Input Unit "u" from 29 words in memory starting at "aaaa". The band number and reload lockout control are encoded in the k-digit. Odd values of k set reload lockout and even values release it. k-digit values 0-1 load band 1, 2-3 load band 2, 4-5 load band 3, 6-7 load band 4 and 8-9 load band 5. Use of the high-order bit of the k-digit to control sign digit transfer and B-register modification is not relevant for this instruction. 
CDW: Card Write (s rkup 54 aaaa)
Write words to Output Unit "u" from memory starting at address "aaaa". The k-digit specifies the format band as for CDRF (48) above. The r-digit sets a group of four relays that were generally used to convey carriage-control information to a line printer. The number of words written is determined by the format band. The low-order bit of the k-digit is not relevant for this instruction.
CDWI: Card Write Interrogate (s xxup 55 aaaa)
Interrogate the status of Output Unit "u". If the unit's buffer drum is ready to receive data from the Processor, branch to "aaaa" after clearing the R register and storing the current control counter in the high-order four digits of R. If the buffer is loaded and the unit is still busy writing to the card machine, continue with the next instruction in sequence.
CDWF: Card Write Format (s xkup 58 aaaa)
Load a format band on Output Unit "u" from 29 words in memory starting at "aaaa". The k-digit specifies the band number as for CDRF (48) above. The low-order bit of the k-digit is not relevant for this instruction.
This ends the first part of the discussion on punched cards and the Cardatron. Stay tuned for the second part on how the Cardatron has been implemented in the retro-205 emulator.

1 comment:

T J Sawyer said...

Paul begins his post with this statement:

"The 1950s through the 1970s were the age of punched-card interfaces for computer systems."

In fact, within popular culture, the punched-card was almost synonymous with computerized data processing. In the early 1950's, Dragnet's Sgt. Joe Friday would submit a suspect's physical description to R&I (Records and Identification). Punched cards would run through a collator hopper with the miscreant's card dropping into the "Select" pocket like magic. That collator would become the card reader on many a computer system.,

By the mid-1950s, more sophistication was needed to mesmerize an audience. The $64,000 question featured a punched card sorter running through a stack of cards to "randomly select" a contestant's first few questions. The sorter had the benefit of twelve pockets for the cards to fall into.

And if you are at this post but not old enough to recognize either of those references, just try typing "fold, spindle or mutilate" into your Google search bar and see how far you get before auto-completion finishes the phrase for you.