return to main pageIPL - Initial Program Load
and the "A" switch wiring and usage
Most "serious" computers have some easy way to get started without much manual effort, such as toggling a start up loader into memory using front panel switches.
Much of the following was inspired by e-mail between Matthias Goerner (asking the questions), and Van Snyder (with the answers) and LaFarr Stuart keeping track ;-))
The key paragraph from Van Snyder seemed to be
"Seven-character set-word-mark, five-character branch with blank d- modifier, and seven-character clear-storage-and-branch do not need a word mark to *finish* fetching the instruction and enter the EX phase, but every instruction executed has to have a word mark under the op code. Of the three that don't need a word mark to move from I to EX, only set-word-mark is not a branch. Any branch, whether its I phase was terminated by sensing a word mark, or indeed if the I-address register was set from the console, has to land on a character with a word mark." 1401 characteristics which support the "LOAD" operation. (as per my understanding of Van Snyder)
- Depressing the "LOAD" button does the following:
- - reads a card (in BDC mode) into 001 through 080,
- - setting a word mark into memory location 001
- - clearing any word marks 002 through 080.
- - starts executing code starting at memory location 001
- Instructions that do not need a word mark in the following memory location to execute properly are:
- The SET WORD MARK and CLEAR-STORAGE-AND-BRACH instructions with two addresses do not need a word mark
- permitting the first instruction, SW 008nnn, to work
- UNCONDITIONAL BRANCH (e.g. B with address and d-modifier=BLANK) the machine will stop the fetching after the I-4 cycle and doesn't need a word mark on the next opcode.
- I-8 is the phase that gobbles characters until it sees a word mark.
The original and primary way to get a 1401 started (assuming 1401 power is on) is to:
In a typical program, the first card of a loader is:
- Set the 1401 operator's panel switches
- rotary switch in "RUN"
- assure that any required sense switches "A"-"G" are set correctly
- depress "START RESET" switch![]()
- On the 1402 Card Reader Punch
,008015,022029,036040,047054,061068,072/061039 ,00100110400003followed in one case by setting memory locations 087-089 (index register 1) to zero000 L003089,040040,040040,04004010400004followed many cards later by a branch to memory location 338 in the loaded program/338080 0066
"begin rambling side trip" - from Van Snyder
Oddly, the newest edition of the "Brownie Book" (A24-1403-5) doesn't include the sentence that says clear-storage-and-branch doesn't need a word mark. I don't know why it was removed. I tried it on the HzG machine, serial number 25000-something, and it branched without fetching an eighth character. At least some 8-character instructions, that the processor knows are 8- character instructions (e.g. BCE, BWZ) work with only seven characters. The processor simply looks in the A register for its d-modifier, thereby using the last character of the B-address. I conjecture this works for other 8-character instructions, e.g. M and L with % as the first character of the A address.
Instructions work if they have too many characters, too. Of course, if the behavior of the instructions changes as the number of characters increases, you get the behavior defined for the maximum meaningful number of characters.
For example, BCE and BWZ work fine with ten characters.
In these cases, the d-modifier is taken from the LAST character, not the eighth one. I conjecture, but I haven't verified, that this also works for five-character instructions, such as select-stacker-and-branch (K), carriage-control-and-branch (F), and maybe control-unit (U). These might get check stops if they have six characters, because the processor might try to form a B-address, but the B-address register is cleared to blanks in I-5, so the fifth character is blank in I-6. But seven or more ought to work.
The default start address for beginning an Autocoder assembly (i.e., if you don't have an ORG paeudo-op) is 333, not 338. Many programs start at their first address, but that's not required.
BTW, pressing the "tape load" key does the following:
- Read a record from tape unit 1 starting in location 1, with word marks - Branch to location 1 There is a line on the SIO that does the same thing, but there's no switch on the console to do it. I assume there was a key on equipment one could plug into the SIO. This makes a PC-to-SIO interface attractive: You don't need to load a "read the SIO" routine to boot from the SIO.
The "A" Switch
with LaFarr Stuart, Van Snyder and the implemention by Ron Mak !! :-))
Ron Mak says (about the latest version of ROPE (Ron's Own Programming Environment :-)) Runtime card input=20 tips From Ed Lots of facts - but how to put them together into what/why you are doing this - it boils down to: a) assume your application has a large number of input cards to read before doing some other processing, such as printing summaries. b) you want to know when the whole input boxes of cards has been read by the card reader - then do the other processing. c) an easy way is to a) you write your application to terminate input processing (and go to some other phase, such as writing the output summaries) when the card reader input hopper goes empty b) but if you have many input cards ( say more than 2,000 ) you LaFarr said
- If = sense switch A=20 (the "last card switch") is on when your program executes an R=20 instruction, you can do a "branch on last card" instruction like=20 this:
B = DONE,A
where the=20 branch to "DONE" is taken only if the card reader is empty (i.e., = the=20 last card has already been read). Note the "A"=20 d-character.- If = sense switch A=20 is off, then the above branch is never taken, and the machine = will=20 immediately halt on an R instruction if the card reader is=20 empty.
- The = sense switches=20 are in the CONSOLE window (press the "Show console ..." button in = the=20 EXEC window). The sense switches are settable only after your program = has=20 started executing, so put in a breakpoint and press the "Start = program"=20 button.
For most programs after the last data cards were put in the card reader you did have to go to the console to turn on the "A" sense switch (which was only effective when the reader was empty). Van said
You can leave sense switch A on. It's wired up in series with the last- card switch in the card reader. The only reason to turn it off is so you can read an entire deck -- including the last two cards, for which the reader stops so you have to push "start" on the reader to read them -- then look at the output, then put some more cards in the hopper, then keep going. LaFarr said
I agree with you, when you are running relatively small runs, you want the last card to go the summary portion of the program. But, when you literally have many thousand of data cards (at the phone company we had a card for every long-distance call made from or billed to a Las Vegas number) it is almost guaranteed that the card reader will run empty a few times before the job is done. Then it is important to have the "A" Switch off, until you really want to let the run end. IBM new what they were doing when they designed the A switch function.
I'm missing something -
What happens when you run out of input cards and the Sense Switch "A" is: in the 1401 branch on sense switch - I would normal test if card reader empty - operator taking a break A sense in series If card reader empty if last cards, now if card reader em branch if A sense on and cards reader empty, take the branch to say do summary processing empty card reader and sense
- ON??
- OFF??
return to main page