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.

Sunday, March 29, 2015

Using the retro-205 Cardatron

This is the second part of a two-part post on the punched-card facilities of the ElectroData/Burroughs Datatron 205 and the Cardatron device that implemented those facilities. The first part of this post reviewed the development of I/O interfaces for the Datatron and described how its Cardatron device was able to connect standard IBM punched-card equipment to the 205.

This second part discusses how the Cardatron and punched-card equipment have been implemented in the retro-205 emulator and how to operate them.

Emulator version 0.04a, with the Cardatron features described below, was released on 7 March and is available from the hosting site at http://www.phkimpel.us/ElectroData/205/webUI/D205.html. The open-source project is presently hosted on Google Code at https://code.google.com/p/retro-205/ GitHub at https://github.com/pkimpel/retro-205/. [Updated 2015-04-11]

Cardatron User Interface

As discussed in the first part of this post, the Cardatron consisted of a central Control Unit and up to seven Input or Output Units. Each Input or Output Unit controlled one IBM card machine.

Cardatron Control Unit

The Control Unit is the interface between the Input and Output Units and the 205 Processor and memory. It also routes I/O commands to the appropriate Input or Output Unit and assures that only one unit is communicating with Processor at a time. In the emulator, the Control Unit has a small window showing its status:

Cardatron Control Unit

The OU lamp is on if last I/O was to an Output Unit and off if to an Input Unit.

The UDn lamps indicate in binary the unit number last addressed. The emulator presently supports the following units:
  • Input Unit 1: IBM 087/089 collator, 240 cards/minute.
  • Output Unit 1: IBM 523 card punch, 100 cards/minute.
  • Output Unit 2: IBM 407 tabulator/printer, 150 lines/minute. In the next release this printer will be moving to Output Unit 3 for compatibility with MEASY and the Algol-58 compiler.
Eventually, I would like to make the units user-configurable, but at present they are hardwired in the emulator source.

The RDn lamps indicate the current "relay designate" settings. The four bits of the "r-digit" in a CDW (54) instruction would set these relays, which in turn could be sensed by the card machine for special action, typically carriage control.

The GENERAL CLEAR button clears both the Cardatron Control Unit and the Processor. It does not clear the individual Input and Output Units.

The INPUT SETUP button causes a CDR instruction (0 00u0 44 0000) to be forced into the C register of the Processor. This provides a convenient way to preset the Processor to read a card from unit "u" when START or CONT was pressed on one of the control panels. The unit number for "u" was determined by a switch in Control Unit. For the retro-205 emulator, this button unconditionally selects Input Unit 1.

See the section "Loading Object Decks," below, for details on how the Control Unit is normally used with the emulator.

Cardatron Input Unit

The Input Unit interfaced card readers to the Control Unit. In the emulator, each Input Unit has a window that combines the controls for the unit and its reader:

Cardatron Input Unit for Punched Cards

The START and STOP buttons control the ready status of the reader. The reader will not feed cards unless the START button is clicked and is illuminated. You can stop and start the reader while it is reading cards.

The NO FORMAT button lights and the reader goes not ready if the Input Unit cannot determine a format band from the card that was just read. Pressing START in this situation will restart the reader and cause the no-format card to be skipped.

The SM (Start Machine) lamp lights while the card reader is in the process of reading a card and transferring the numeric and zone column data to the buffer drum. The lamp goes out after the card is read and the unit is waiting for the Processor to read the buffer.

The RLO (Reload Lockout) lamp lights when reload lockout is in effect for the unit.

The FLO (Format Lockout) lamp lights when reload lockout has been initiated by a 8-punch in the format column of the card instead of the low-order bit in the k-digit of a CDR or CDRF instruction. Whenever FLO is lit, RLO will also be lit. The following ASCII characters in the format column can be used to initiate format lockout:
  • "`" = 1-8 punch (grave accent)
  • ":" = 2-8 punch
  • "#" = 3-8 punch
  • "@" = 4-8 punch
  • "'" = 5-8 punch (apostrophe)
  • "=" = 6-8 punch
  • """ = 7-8 punch (double quote)
The FSn lamps indicate the binary code for the currently-selected format band.

The FORMAT SELECT pull-down list is an artifact of the emulator and did not exist on the Cardatron, although its effect could be produced through special plugboard wiring on the card machine. It overrides the characters in the format column and specifies directly the format band to be used for reading cards. When set to "By Col" (the default), the format band number will be determined from the character in the card column specified by the FORMAT COL control. Any other setting will specify the number of the format band to be used, regardless of what is on the card being read.

This control is provided in the emulator as a convenience for reading text file "decks" that may not have a column set aside to select a format band.

The FORMAT COL pull-down list specifies the card column from which the format band selection (and possibly, format lockout signal) will be taken. Since columns 1 and 80 were common choices for format columns, 80 appears first in the list.

The CLEAR button clears the Input Unit and resets it to a default status. It does not, however, empty the input hopper.

The file-picker control (with a button typically labeled Browse... or Choose Files) is used to select one or more text files from your local file system that will be loaded into the "input hopper" of the reader. You can select multiple files, one at a time, to stack them in the input hopper. In most browsers, you can also select multiple files at once, but the order in which the files will appear in the input hopper may be indeterminate. The control will display the name of the last single file loaded.

The INPUT HOPPER progress bar below the file-picker control shows the relative amount of data left in the input hopper of the reader. The bar advances to its far right position each time a file is loaded into the reader. As cards are read, the bar diminishes to its left in proportion to the amount of data that has been read.

When the reader is in a not-ready condition (the STOP lamp is lit), clicking anywhere in the progress bar will display a dialog box asking if you want to empty the input hopper. If you reply in the affirmative, the entire hopper will be cleared, regardless of the number of decks (text files) remaining in it.

The area below the progress bar displays the last two cards that have been read, with the last card on the bottom.

Cardatron Output Unit for Line Printer

Output Units are used for both card punches and line printers. The user interface differs slightly between the two. Each printer device has a window that combines the controls for the Output Unit and the printer:

Cardatron Output Unit for a Line Printer

The START and STOP buttons control the ready status of the printer, similar to that for the card reader. The printer can be stopped and started while it is in operation, but it will not print unless the START lamp is lit. The lamp is lit and the device is made ready automatically when the emulator is powered up.

The END OF SUPPLY button lights and the printer goes not-ready when it is "out of paper." At present, the paper capacity is 150,000 lines -- about equivalent to a box of the pin-feed paper that was used with printers of the time. The output of the printer is held in memory so that it can be copied or saved later. The capacity limit prevents memory from being flooded endlessly with line images. When the limit is reached, the printer stops and this button lights. Clicking the button will allow one additional line to be printed each time it is clicked, but continuous operation of the printer will not resume until the output area is cleared by one of the two methods discussed below.

The FEED SUPPLY button performs two functions. The first is that clicking the button while the printer is in a not-ready status will simulate a form feed. The second is that clicking the button three times in succession while the printer is in a not-ready status will display a dialog box asking if you want to clear the output area. Make sure you have copied or saved any data from the output area you wish to keep before responding in the affirmative. This is one way to clear the output area and reset the end-of-supply condition discussed above.

The CLEAR button clears the Output Unit and resets it to a default status. It does not, however, clear the output area.

The SM (Start Machine) lamp lights while the printer is in the process of transferring the numeric and zone column data from the buffer drum and printing a line. The lamp goes out after the line is printed and the unit is ready for the Processor to send another line of data.

The FSn lamps indicate the binary code for the currently-selected format.

The GREENBAR checkbox controls whether the output area is formatted with greenbar shading, similar to that traditionally pre-printed on the pin-feed paper used with line printers. Uncheck this box if you plan to copy the printed output to another program or save it to a file, as for some browsers (particularly Firefox), the greenbar formatting causes additional blank lines to be included in the data that is copied or saved. You can check or uncheck this box at any time, even while the printer is operating.

The ALGOL GLYPHS checkbox for the Output Unit controls which set of ASCII characters the emulator uses when outputting the internal 205 codes corresponding to the four characters discussed below. If the box is unchecked, the commercial character set is used; if the box is checked, the FORTRAN (scientific) set is used. This setting also can be changed at any time, even while the printer is operating.

The IBM 407 print wheels had 48 characters plus the space. IBM offered print wheels with different character sets, which were used for different applications. The two that were most commonly used with the Cardatron were the standard commercial set (wheel configuration A) and the FORTRAN set (wheel configuration F). Wheel configuration A had the following characters:


The "¤" glyph is termed the "lozenge". There are 47 glyphs shown above. A space, as with most impact printers, was generated by printing nothing in a column, so what was on the 48th print wheel position? That was another asterisk used by the 407 to replace leading zeroes in an amount for check protection (e.g., "$******123.45").

Wheel configuration F substituted the following characters for use with FORTRAN and other "scientific" languages (such as Algol):
  • & : +
  • # : =
  • % : (
  • ¤ : )
See the IBM FORTRAN II General Information Manual, Appendix B, for more information on these character sets.

Below the checkboxes is the SUPPLY REMAINING progress bar, which shows the relative output capacity remaining from the 150,000-line limit. The bar will diminish to the left as lines are printed.
The output area occupies the remainder of the window, showing the data as it is being printed. Lines scroll off the top of this area, but are retained in the browser's memory. When the printer is not operating, you can scroll back to view earlier lines and copy them for pasting into another program. The output area is an HTML frame, and many browsers will allow you to save the text directly from it to a file on your local workstation.

Another option for capturing the text that has been printed is to double-click anywhere in the output area. As with the output areas for the Flexowriter and paper-tape punch, this will do two things:
  1. A new, temporary window will be opened and the entire text of the output area will be copied into this new window. If the GREENBAR box is checked, this text will not show the green shading, but will also not have any extra blank lines.
  2. The output area will be cleared. This is the second way to reset the end-of-supply condition discussed above.
    Double-clicking the output area can be done at any time, even while the printer is operating. You can copy, save, or print the text in the temporary window as you wish. When you are finished, simply close the temporary window.

    Cardatron Output Unit for Punched Cards

    Like printer devices, each card punch device has a window that combines the controls for the Output Unit and the punch:

    Cardatron Output Unit for Punched Cards

    The layout and operation of this window is identical to that for printer devices, except that it does not contain the GREENBAR checkbox and green shading is never applied to the output area. The capacity limit of the output area for a card punch is 150,000 cards.

    Loading Object Decks

    One of the more common uses of a card reader on the 205 was loading program object decks into memory so the program could be executed. This section describes how to do that using the retro-205 emulator.

    Standard practice was to create object decks so that they could be loaded using the hard-wired format band number 6, since this did not require any of the programmable format bands to be loaded first. Therefore, there needs to be a "6" in some column of each card, and the most likely choice is column 1.

    A common practice, though, was to punch 6s in columns 1-3. Format band 6 read seven full, 11-digit words (backwards, of course) from columns 4-80, plus only the low-order three digits of a word from columns 1-3. That partial word was of very limited use when loading an object deck, so filling those three columns with 6s allows the deck to be loaded with the Cardatron Input Unit set to select the format from any of those columns.

    A well-designed object deck was also self-locating in memory. The first word read from the first card (i.e., the one in columns 72-80) typically had a sign with a value in the 4-7 range, indicating an instruction to be executed rather than a word to be read into memory. The address in that instruction would specify where in memory the program should start. Once again, see the three-card memory-clear program cited in the first part of this post for a good example of how this was done:


    To load an object deck perform the following steps in the order listed:
    1. First, make sure the reader is not ready and that its "input hopper" is empty.
    2. Set the FORMAT COL control on the reader to the column from which format 6 will be sensed -- typically column 1. Alternatively, you can set the FORMAT SELECT control to 6, but this is not usually the best method to use.
    3. Use the file picker control on the reader to select from your local system the text file containing the object deck.
    4. Click the START button on the reader. The reader should feed the first card image and the FSn lamps should indicate format number 6.
    The reader is now ready, but the initial CDR (44) instruction to command the reader must be entered into the Processor manually. This could not be done easily on the Supervisory Panel, as the Cardatron unit number is sensed from the third digit in the instruction word, and that digit cannot be entered in the C register. Therefore, you need to go to the Control Console and do the following:
    1. Press the CLEAR button to clear the Processor.
    2. Set the INPUT knob on the right side of the Console panel to KEYBOARD.
    3. Click the CONT button. This will attempt the execute the instruction in the C register. Since that register was just cleared, the instruction will be 0 0000 00 0000, i.e., a PTR that will attempt to read from the currently-selected Console device to address 0000. Since that is the keyboard, the KEYBOARD annunciator will light.
    4. On your workstation's keyboard, enter: 6 0010 44 0000 and press Enter. This will read one card from Input Unit 1 to address 0000. If loading from a different unit, change the 1 to the appropriate unit number.
    5. The load deck should relocate that 0000 address and include additional instruction words to read the remainder of the cards automatically.
    The 0.04a version of the emulator implements a simpler way to bootstrap the deck once it has been loaded into the reader. Thanks to Tom Sawyer for pointing out this method to me.
    Load the deck into the reader using the first four steps above. Instead of the five steps immediately above, however, do the following:
    1. Click GENERAL CLEAR on the Cardatron Control Unit.
    2. Click INPUT SETUP on the Cardatron Control Unit. This will preset the Processor for a CDR (44) instruction for Input Unit 1 and address 0000.
    3. Click START on the Supervisory Panel or CONT on the Control Console to start the load.
    Depending on how the load deck is constructed, it may be possible to place a data deck for the program in the reader after the load deck so that the data will be available immediately to the program. The two conditions that may permit this are:
    • Format of the data cards must be sensed from the same column as the Input Unit used to load the program.
    • If the program must load one or more input format bands (typically the case), those bands must be loaded before the card reader is able to read the first data card. One way this can be done is to have the last card of the load deck put the reader in reload-lockout to prevent the first card in the data deck from being read automatically by the Input Unit. The initialization code in the program could then load the format band(s) in the Input Unit, maintaining reload-lockout until the CDRF (48) instruction for the last band to be loaded. The last (or only) CDRF releases reload-lockout, allowing the first card to be read asynchronously by the Input Unit with the appropriate format band now correctly loaded.
    If at either of these conditions could not be met, then the load deck should be loaded and read separately. Once the reader is empty and the program has loaded its input format band(s), the data deck can be loaded into the reader.

    In Other News...

    Tom Sawyer and I have been having some problems with the HTML5 Application Cache (App Cache) feature in Firefox, so in release 0.04a I have disabled the emulator's use of it. This should not affect your ability to use the emulator when you can actively connect to the hosting site, but it will prevent you from using it when a connection to the hosting site is not available. I hope to have that capability reinstated in the next release.

    Last week Google announced that it is terminating its free Google Code project hosting service. Projects will become read-only in August 2015 and the service will be shut down completely in January 2016. The retro-205 emulator project, of course, uses Google Code, so now we need to find a new home for it.

    I am currently evaluating other project hosting services and hope to make a decision in the coming week. I also need to move the retro-b5500 emulator project, and intend for both projects to end up on the same service. Once the 205 project is moved to its new home, I'll make an announcement on this blog. The project site on Google Code will also have a forwarding reference to the new site.

    Since completing the implementation of the Cardatron and punched-card interfaces described above, I have been working on resurrection of Donald Knuth's EASY and MEASY assemblers. These are the assemblers used to develop his Algol-58 compiler for the 205. That effort is progressing well, and I hope to have a report on it in the next few weeks.

    The next big development task for emulator is implementation of the 205's magnetic tape subsystem. This is a necessary capability for both the MEASY assembler and the Algol-58 compiler. This is also a large task, and it may be a couple of months before it is available.

    No comments: