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:
“The present war having so long cut off all communication with Great-Britain, we are not able to make a fair estimate of the state of science in that country. The spirit in which she wages war is the only sample before our eyes, and that does not seem the legitimate offspring either of science or of civilization.”
—Thomas Jefferson (17431826)
“Typical of Iowa towns, whether they have 200 or 20,000 inhabitants, is the church supper, often utilized to raise money for paying off church debts. The older and more conservative members argue that the House of the Lord should not be made into a restaurant; nevertheless, all members contribute time and effort, and the products of their gardens and larders.”
—For the State of Iowa, U.S. public relief program (1935-1943)