Booting and Sample Program
When the LOAD button on the IBM 1402 Card Read-Punch was pressed, a card was read into memory locations 001-080, a word mark was set in location 001, the word marks in locations 002-080 were cleared, and execution started with the instruction at location 001. That was always the dyadic Set Word Mark (it was the only instruction not requiring a following word mark) to set word marks for the two following instructions. Execution of instructions in the card deck continued, loading the program into memory, setting word marks, and then branching to the program's start address.
One-card programs could be written for various tasks. Commonly available were a one-card program to print the deck of cards following it, and another to duplicate a deck to the card punch. From Tom Van Vleck's web site here is a one-card program which will print "HELLO WORLD". Pressing LOAD (above) begins execution at location 001 (the first ","). The program is: set word marks (opcode "," operands 008 015), set more word marks, clear storage - part of the print area 333-300 (opcode "/" operand 333), clear storage - the rest of the print area 299-200 (opcode "/" using a chained address), move "HELLO WORLD" to the print area (opcode "M", operands 079 and 250), print a line (opcode "2"), eject the page in the printer (opcode "F" modifier "1"), and halt (opcode "." operand 065 - a branch address, to this same halt command, if start is pressed).
, 008015,022029,036043,050054,055062,063065,069080/333/M0792502F1.065HELLO WORLD
Read more about this topic: IBM 1401
Famous quotes containing the words sample and/or program:
“All that a city will ever allow you is an angle on itan oblique, indirect sample of what it contains, or what passes through it; a point of view.”
—Peter Conrad (b. 1948)
“At Hayes General Store, west of the cemetery, hangs an old army rifle, used by a discouraged Civil War veteran to end his earthly troubles. The grocer took the rifle as payment on account.”
—Administration for the State of Con, U.S. public relief program (1935-1943)