Here is a program to read the next card on the IBM 701, one 18 bit machine instruction per line:
read select card reader;The hardware copy instruction would wait until the data was available and also automatically skip the following instruction when issued after there were no more words to be copied from the current card. In the case of the card reader there were two 36 bit words per card row for a total of 24 words per card. Columns 73 thru 80 were not read.
load (address of buffer)−1 into accumulator;
A: Add 1 to accumulator; (by accessing word holding 1)
store address into copy instruction at C; (from accumulator)
C: copy *; (word from card reader to buffer)
transfer unconditionally to A;
The 704 had index registers which mostly obviated self modifying code. The 709 onward had data channels which would transfer a sequence of words between the IO device and memory, without the attention of the CPU.
The ‘record’ on tape played the role of the card in a card deck. The tape drive would move over a record at constant speed and stop only between records. Records could be of any number of words. Reading tape records was a bit more complex than a card in that one might want to guard against reading tape records larger than expected. A write operation to tape could produce a tape record of any positive integral number of words. Additional tape orders would rewind tape, write end of file and test for parity error. On reading, an end of file was sensed as a tape record of 0 words. As with modern tapes, it was hazardous to read after writing without first backspacing or rewinding. Upon beginning to read, the tape would continue to move until it had passed over the block as written. The tape would stop only between blocks, as recorded. The 701 tapes were 100 characters per inch. They had six bit characters and six data tracks plus one parity track. The 704 tapes were 200 and later 556 cpi. The 709 went to 800 cpi. The programming manual forbad the program from consulting the MQ register during tape operations as that was the assembly or disassembly register. But a program could store the MQ and see progress. Starting with the 704, tapes had horizontal and vertical parity. They also had a separate read head after the write head which checked the parity of the data as it was written. 9 track tapes came in only with the IBM 360.
The IBM 701 had a card reader and punch adapted from the 514 summary punch, and a printer which was adapted from the IBM 407 accounting machine without its card reader. The printer was programmed just like the card punch and a replaceable plug board determined where on the page the 72 program controlled columns appeared. There were several magnetic 7 track tapes (about 4) and a magnetic drum (or two) of 8192 words each.
Words on the drum could be individually written without changing the neighboring words. A program settable register determined where on the drum data was to be accessed.
Subsequent machines of the same architectural family were the 704, 709, 7090 and 7094. Those machines had faster tapes but the drums became obsolete with the larger core memory of the later machines. The “unit record equipment”, cards and printer, remained unchanged in the later machines.
More information on 701 IO.
See Calculation Order for similar information.