UsingThePaperTapePunch - pkimpel/retro-1620 GitHub Wiki

Using the 1624 Paper Tape Punch

The IBM 1624 was a paper tape punch unit used with the IBM 1620. The punch was housed in the same cabinet as the IBM 1621 paper tape reader, but the two were independent units. For information on the 1624, see the IBM 1621 Paper Tape Unit manual.

In the retro-1620 emulator, the paper tape reader and punch are implemented separately and each has its own window on the screen. This was done primarily to allow flexibility in positioning the windows for these units and making best use of available screen space. The paper tape punch is not in the emulator's default configuration, so you will need to select it by clicking the Configure System button on the main window of the emulator.

The punch and 1627 plotter units used the same connection to the rest of the system. Thus, only one of these units can be enabled in the system configuration at the same time. The emulator's configuration window enforces this restriction.

The window in the emulator for the punch looks like this:

1624 Paper Tape Punch

The 1624 could output 15 tape frames (characters) per second and start and stop between individual frames. The punch used eight-channel tape. The holes punched in each frame were identified as follows:

E X 0 C 8 4 2 1

where E is the EOL or end-of-record punch and C ("check") is a punch that maintains odd parity for the frame. Smaller sprocket-feed holes were punched between the 8 and 4 punches. A special punch pattern, X0C8421, termed "tape-feed," can be output manually by a switch on the unit's control panel. Tape-feed frames are ignored by the reader during numeric and alphanumeric reads and are not transferred to memory.

To use the retro-1624 paper tape punch, you execute Write Numerically (op code 38, Q8/Q9=02), Write Alphanumerically (op code 39, Q8/Q9=02), or Write Binary Paper Tape (op code 39, Q8/Q9=32) commands in the Processor. The frame codes generated by the punch are stored in the punch's internal buffer, analogous to a roll of blank tape in a physical punch. The buffered frame data can then be exported to an image file, as described below under "Capturing Punch Output."

The internal buffer has a maximum capacity of 120,000 frames, sufficient for almost 2.25 hours of continuous punching. If the buffer fills up, the punch stops, as discussed in more detail below. The contents of the buffer are lost when the emulator is powered off.

In the retro-1620 emulator, paper tape image files have two formats:

  • Binary โ€“ tape frames are represented as eight-bit bytes with the E punch being the high-order bit and the 1 punch being the low-order bit in the byte. This is typically the format used in image files produced by digitizing physical paper tapes.

  • ASCII โ€“ tape frames are represented as ASCII characters in a text file. This is a format developed for the retro-1620 emulator to make creation and editing of image files easier. A script exists to convert binary image files to this format.

The emulator can write image files in three modes:

  • Numerically โ€“ single digits from memory are each translated to tape frames and stored in the internal buffer. This mode is typically used for object code and numeric-only data.

  • Alphanumerically โ€“ digit pairs (alphanumeric character codes) starting at an even address in memory are each translated to tape frames and stored in the buffer. This mode is typically used for source code and other textual data.

  • Binary โ€“ digit pairs starting at an even address in memory are each translated to tape frames and stored in the buffer. The X08 holes in a tape frame become the even digit in memory. The 421 holes in a frame become the odd digit at the next higher address. Reading and generating binary tapes requires that the "Binary Capabilities" option be enabled in the emulator's configuration.

Frame data in the punch's internal buffer can be exported in either a Binary or ASCII format. Either format can be read later using any of the three modes, although some frames, depending upon the mode, may be interpreted as being invalid or having incorrect parity, e.g., punching data intended for Binary mode using Alphanumeric mode.

The format of the image files is discussed in more detail separately in the "Format of Paper Tape Image Files" section of the Paper Tape Reader wiki page.

Paper Tape Punch Window

The window for the punch has controls to monitor the operation of the punch and generate image files from frame data in the internal buffer. The window can be resized and moved on your workstation display as desired. Resizing the window in the horizontal direction will adjust the width of its internal elements proportionately. Resizing the window vertically will simply change the height of the window and is not particularly useful.

The window has the following controls and displays:

PUNCH FEED โ€“ turning on this switch will generate tape-feed frames continuously at the rate of 15 frames/second and store them in the internal buffer until the switch is turned off. On a real punch, this was used to prepare a portion of the tape as leader for threading the tape in the punch mechanism or to provide a gap in the data for cutting and splicing the tape. This switch is active whenever the punch does not have a write operation in progress.

(Buffer Status) โ€“ next to the tape-feed switch is a meter bar that shows the relative amount of storage space left in the internal buffer, analogous to how much un-punched tape was left on the supply roll. The height and styling of the meter varies by browser.

The meter's indicator will be all the way to the right after clearing the buffer, and moves to the left as frames are generated and stored in the buffer. If the buffer becomes full, the punch is effectively "out of tape," and will stop. It can be restarted as described in the "Recovering from Punch Halts" section below.

(Tape View) โ€“ below the buffer-status meter bar is a white area that will show the frames most recently written to the buffer, as if you were watching the tape pass by. Characters enter the right side of the area, shift to the left as additional frames are written, and are discarded when they reach the left side. The last frame punched is on the far right.

This display is useful to see where you are in the progress of punching, or to spot invalid characters if a frame has caused a write check and halted the reader. An EOL frame is shown as <. Tape-feed frames are shown as an underscore, &#x5F. Frames that do not translate to an ASCII-equivalent character are shown as a middle-dot, ยท.

Controlling the Punch

The punch has no controls to start it, stop it, or make it ready. The punch is ready whenever its internal buffer is not full and the PUNCH FEED switch is off. The punch goes not-ready once the its internal buffer becomes full.

If the 1620 attempts to execute a paper-tape write operation when the punch's internal buffer is full, the write operation will be suspended in the Processor, and the WRITE INTERLOCK and MANUAL lamps on the Control Panel will light. The AUTOMATIC lamp will remain lit. The same thing will happen if the buffer becomes full in the middle of a write operation. When this occurs, you have two options:

  1. Press the RELEASE button on the Control Panel to cancel the write operation. This will halt the Processor and extinguish the WRITE INTERLOCK and AUTOMATIC lamps. Pressing the START button will resume automatic operation at the instruction following the write instruction that was canceled.

  2. Clear the internal buffer, possibly saving the buffered data in an image file first, then resume the suspended write operation as described in the "Recovering from Punch Halts" section below.

Paper tape records can be of arbitrary length and are terminated only by an EOL frame. Some tape images, especially those used to store object code, can have extremely long records that may take many minutes to write. To cancel the write operation for such a long record and stop and punch, simply press the RELEASE button on the Control Panel.

Capturing Punch Output

Clicking the three-bar ("hamburger") menu icon on the far right of the window will open a small panel on top of that icon with options for capturing the output and emptying the internal buffer:

1624 Paper Tape Punch Menu

Extract โ€“ Opens a temporary window and copies the contents of the internal buffer to that window as ASCII text. From that temporary window you can save the contents of the window to a file, print it, or copy/paste the data into another program. If you save directly from the window, make sure you save as text, not HTML. When you are finished, simply close the temporary window.

EOL frames are represented in the window as new-lines. Frames that do not have an ASCII equivalent are shown as ?. See "Format of Paper Tape Image Files" for other details.

Save ASCII โ€“ Opens a standard save-file dialog to save the contents of the internal buffer as an ASCII tape image file to your local system. Frames are represented in the file as for the Extract button above. The dialog provides a default name, which you can change before saving. If your browser saves the file without opening a dialog, check your browser settings โ€“ there should be an option to select how downloads are to be saved.

Save Binary โ€“ Opens a standard save-file dialog to save the contents of the internal buffer as a Binary image file to your local system. Frames are simply written from the buffer to the file as 8-bit bytes without any translation.

Clear โ€“ Clears the internal buffer and closes the panel. This performs the equivalent of loading a fresh roll of blank tape on a real punch.

Close โ€“ Simply closes the panel.

Recovering from Punch Halts

The 1624 Paper Tape Punch required a rather strange recovery procedure when it halted due to a punching error, invalid frame code from the Processor, or an out-of-tape condition.

In these cases, the system stops with the WRITE INTERLOCK, AUTOMATIC, and MANUAL lamps on the Control Panel lit. If it stopped due to a punching error or invalid frame code, the WR CHK lamp will also be lit. This stop will occur regardless of the position of the I/O STOP/PROGRAM switch. The tape does not advance.

The recovery procedure is described in the IBM 1621 Paper Tape Unit manual at the bottom of page 7 and top of page 8. In summary that procedure is this:

  1. If the stop was due to the internal buffer being full, clear the internal buffer, saving its contents first if necessary. This is analogous to loading a new roll of tape into the punch.

  2. Turn on the PUNCH FEED switch. If the switch was already on, turn it off, then back on. A tape-feed code will replace the last character in the buffer. If the current I/O operation is Write Binary Paper Tape (op code 39, Q8/Q9=32), an EOL frame will also be stored in the buffer. The WRITE INTERLOCK, AUTOMATIC, and WR CHK lamps will go out, returning the system to manual mode.

  3. Press the START button on the Control Panel. If an I/O operation was in progress, it will resume and the original character from storage will be output again. If the system stops again due to an invalid frame code, your only option may be to cancel the I/O operation by pressing the RELEASE button on the Control Panel.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ