UsingTheCardPunch - pkimpel/retro-1620 GitHub Wiki

Using the 1622 Card Punch

The IBM 1622 was a combined card reader/punch unit used with the IBM 1620. The reader and punch were housed in the same cabinet, but effectively were independent units. For information on the 1622, see the IBM 1622 Card Read-Punch manual.

In the retro-1620 emulator, the 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.

There were two models of the 1622. A Model 1 could punch 125 cards/minute; the Model 2 could punch 250 cards/minute. You can select which model you want to use in the retro-1620 system configuration. The default is a Model 2. Both the reader and punch are either included or excluded as one in a retro-1620 system configuration and will be of the same model.

There is no special preparation to use the retro-1620 card punch. When the emulator initializes with a card reader/punch in its configuration, it places the punch in ready status, ready to receive commands from the retro-1620 CPU.

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

1622 Card Punch

Like a real 1622, the emulated card punch has a one-card internal buffer. When a punch command is executed in the CPU and the buffer is available, the data is transferred at high speed to the buffer. The data is held in this buffer until the punch mechanism is not busy, at which point a punching cycle is started and the buffer is marked not available. After the cycle completes, the buffer is again marked available, allowing it to receive the next card's data from the CPU. If the buffer is not available when the CPU initiates a punch command, the CPU waits until the buffer becomes available. This arrangement allows some CPU processing to overlap the punching of cards.

Unlike a real 1622, however, the emulated card punch does not have a two-stage transport path. When the 1622 punch was started, it fed two cards into the machine and held them there until the next punch cycle started. After the last punch command from the CPU, the last card punched was held in the transport path. This last card was ejected when the next card was punched, or when the punch was made not-ready by pressing the STOP button, all blank cards were removed from the input hopper, and the NON PROC RNOUT switch was activated.

In the emulated card punch, cards are simply "punched" and placed in the "output stacker." No special action is needed to obtain the last card punched.

When punching cards without much CPU processing taking place between them, it is not unusual for the orange WRITE INTERLOCK lamp on the Control Panel to come on and stay on. This lamp comes on when the CPU attempts to punch a card, and is turned off when the CPU finishes transferring one card's data to the punch's internal buffer. When the CPU is mostly waiting for the prior card to be punched, the lamp will appear to be on continuously.

Card Punch Controls and Lamps

The Card Punch window has the following controls and lamps:

POWER READY lamp – comes on when the punch's window is opened and remains on.

PUNCH READY lamp – comes on whenever the punch's transport is ready (i.e., automatically when the emulator is initialized or after pressing the START button). It turns off when the STOP button is pressed or when an invalid character causes the punch to stop and turn on the PUNCH CHECK lamp.

PUNCH CHECK lamp – comes on when a card with invalid characters is punched. It turns off when the CHECK RESET or NON PROC RNOUT switch is used as described below.

START button – makes the punch ready and turns on the PUNCH READY lamp. If a card has already been placed in the punch's internal buffer, the punch cycle for that card begins immediately.. It is also used to make the punch ready again after pressing the STOP button. This button is ineffective if the PUNCH READY lamp is on, the STACKER lamp is on, or the PUNCH CHECK lamp is on.

STOP button – places the punch in a non-ready status. If the PUNCH READY lamp is on, it is turned off. While the punch is in a non-ready status, the CPU will not be able to send data to the punch's buffer, but will remain in the AUTOMATIC mode with the Control Panel WRITE INTERLOCK lamp on. This button is ineffective if the PUNCH READY lamp is off.

CHECK RESET button ‐ resets the PUNCH CHECK lamp after an invalid punch is detected in a card. It can be used when the punch is in either a ready or not-ready status.

SELECT STOP / N-STOP switch ‐ controls the action of the punch when a punch check occurs and the PUNCH CHECK lamp comes on. In the STOP position, causes the punch to stop. In the N-STOP position, allows punching to continue without stopping.

NON PROC RNOUT switch – also referred to as "NPRO." On a real 1622, this switch was used to run out the cards held in the punch's transport path. In the emulator, it simply resets the PUNCH CHECK lamp if it is lit. This switch is ineffective when the punch is in a ready status and the PUNCH READY lamp is on.

Below the panel of buttons, lamps, and switches is a meter bar. This shows the relative number of cards in the punch's "output stacker." The capacity of the stacker is set in the punch configuration and defaults to 10,000 cards. Once the limit is reached, the punch stops and the STACKER lamp comes on. Once that lamp comes on, the only way to continue is to unload the stacker.

Capturing Punch Output and Unloading the Stacker

Clicking the three-bar ("hamburger") menu icon in the upper-right of the stacker area will open a small panel on top of that icon with options for preserving the output and unloading the stacker:

1620 Card Punch Menu

Extract – Opens a temporary window and copies the contents of the stacker to that window. From that temporary window you can save the contents of the window to a file 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.

Print – Opens a standard print dialog to print the contents of the stacker to a local device. Most modern browsers will also have an option to print to a PDF file. This button is active only when the PUNCH READY lamp is off.

Save – Opens a standard save-file dialog to save the contents of the stacker as a text file on your local system. The dialog provides a default name, which you can change before saving. This button is active only when the PUNCH READY lamp is off. 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.

Clear – Unloads (clears) the stacker and closes the panel. This button is active only when the PUNCH READY lamp is off.

Close – Simply closes the panel.

The former methods of unloading the stacker by clicking the meter bar or double-clicking the NON PROC RNOUT switch are no longer implemented.

The card data is just plain ASCII text. The individual card images are space-trimmed on the right, so usually they will be of variable lengths. The translation between core memory representation and ASCII text is symmetric with the Card Reader with a few exceptions. See "Format of Card Deck Files" in the Card Reader wiki page for the standard translation. All invalid codes in core memory are translated to ? by the punch.

The symmetry exceptions only occur when reading alphanumeric data with the Read Numerically (RN, 36) instruction and then writing it with the Write Numerically (WN, 38) instruction. The card reader translates the alphanumeric characters to single digits as shown in Appendix D of the IBM 1620 Central Processing Unit, Model 2 reference manual.

Note from that appendix that a Read Numerically instruction translates multiple alphanumeric characters from the Card Reader to the same flagged or non-flagged digit value in core memory, thus:

Alphanumeric Read Numerically Digit
0, +, blank 0
1, A, / 1
2, B, S 2
3, C, T 3
4, D, U 4
5, E, V 5
6, F, W 6
7, G, X 7
8, H, Y 8
9, I, Z 9
Record Mark A (8-2 bits, Record Mark)
., ,. = B (8-2-1 bits, invalid code)
@, (, ) C (8-4 bits, Numeric Blank)
Group Mark F (8-4-2-1 bits, Group Mark)
- flagged 0
J flagged 1
K flagged 2
L flagged 3
M flagged 4
N flagged 5
O flagged 6
P flagged 7
Q flagged 8
R flagged 9
$ flagged B (F-8-2-1 bits, invalid code)
* flagged C (F-8-4, flagged Numeric Blank)

Digits in core memory are translated to ASCII characters by a Write Numerically instruction in the punch as follows:

4-bit Digit Value Non-flagged Flagged
0 0 ]
1-9 1-9 J-R
hex A (Record Mark) | !
hex B (invalid code) = $
hex C (Numeric Blank) @ *
hex D (invalid code) ? ?
hex E (invalid code) ? ?
hex F (Group Mark) } "

Note that for both numeric and alphanumeric output, a Record Mark or Group Mark in core memory does not terminate the transfer of data to the punch. All writes to the punch involve the transfer of 80 digits or characters, wrapping from the highest address in memory to address 0 if necessary.

⚠️ **GitHub.com Fallback** ⚠️