• Keine Ergebnisse gefunden

DIA -,PTR

Im Dokument NOVA HOW (Seite 73-78)

Chapter III Hardcopy Equipment

DIA -,PTR

a

o 2

Data In A,Paper Tape Reader

3

AC

I

4

o o

5 6 7

F

o a a a

I

8 9 10 11 12 13 14 15

Transfer the contents of the reader buffer into AC bits 8-15, and perform the function specified by F. Clear AC bits 0-7.

Setting Busy causes the reader to read all eight channels from the next line on tape into the buffer (the presence of a hole products a 1 in the buffer). When the operation is complete the reader clears Busy and sets Done, requesting an interrupt if Interrupt Disable is clear. When the character is brought into AC, tape channel 1 corresponds to AC bit 15.

Clearing Busy stops the reader.

Timing. At 300 lines per second the faster reader takes 3.3 ms per character. After Done is set, the program has 100 JLS to retrieve the character and set Busy to keep the tape in continuous motion. Waiting longer forces the reader to stop and restart, and the program should not attempt to operate the reader in this manner at rates above 150 lines per second. Faster start-stop rates produce reader chatter, which is not only rather annoying but also conducive to less reliable reader operation.

The sprocket reader requires at least 6.7 ms per line. After Done is set, the program has 1 ms to retrieve the character and set Busy to maintain the maximum transfer rate, but" the reader can operate at any speed up to 150 lines per second.

Operation. Tapes can be oiled or unoiled but must be opaque. To load the sprocket reader, place the fanfold stack vertically in the bin at the right, oriented so that the front end of the tape is nearer the read head and the feed holes are away from you. Lift the gate, take three or four folds of tape from the bin, and slip the tape into the reader from the front. Carefully line up the feed holes with the sprocket teeth to avoid damaging the tape, and close the gate. Make sure that the part of the tape in the left bin is placed to correspond to the folds, otherwise it will not stack properly. Turn on the power switch so the reader can respond to the program.

At the left on the brake-clutch reader is an OFF I LOAD IRUN switch. The motor is on when the switch is in either of the latter two positions, but in LOAD the brake is off. However, to slip the tape in or out of the reader mechanism, you must lift the lever in the center; and this overrides the other switch, so tape can be load~d in RUN. The loading procedure is the same as for the sprocket reader but there is nothing to line up: simple press the tape against the back plate and pull the lever back down.

3.3 LOADING PROGRAMS

Before a program can be executed it must be brought into memory. This requires that a loading program already reside in memory. If the memory is empty, one ean use the automatic loading switches on the Supernova, Nova 800 or Nova 1200, but with the Nova or with a Nova 800 or 1200 without the program load option, one must use the data switches to deposit a bootstrap loader, which is ordinarily used only to bring in a more extensive binary loader. This lattcr program is then used to read the object tapes of all other programs. The binary loader usually resides in high core where it is not disturbed by any of the standard softwarc. But if an undebugged user routinc inadvertently destroys the binary loader, it can be restorcd by first reloading the bootstrap manually.

Below are two versions of the standard bootstrap loader, one for the teletype reader, the other for the high speed reader. This program loads data relatively to its own position in memory. Although the bootstrap can be placed anywhere, the usual procedure is to place it in high core, beginning at the seventeenth (twenty-first octal) location from the top, so that the binary loader also residcs in high corc. Thc program is shown here for placement at the top of a 4K memory.

The bootstrap loader reads a tape in a special format in which each word is divided into four 4-bit characters. Each character occupies channels 1-4 (the right half) of a line on the tape. The first character of a word, containing bits 0-3, is indicated by a 1 in channel five. The tape can begin with any number of blank lines. The first two words are ST AI,.

+

1 and JMP . - 4, which are stored in the final two loader locations as indicated in the listing. The third, fifth, . . . words are ST A instructions that address ACl, the fourth, sixth, . . . words are data. The bootstrap executes each odd-numbered word to store the succeeding data word in the location specified by the ST A instruction. The final odd-numbered word is a HAL T, which stops the processor.

3-7

In the following listings the first two columns at the left give each memory location and its contents for a 4K memory. The remaining columns are a standard program listing. To load the program simply use. the switches to place the octal numbers in the locations specified. For a memory of any other size, load the bootstrap beginning at a location whose address is 208 less than the largest address.

;BOOTSTRAP LOADER, TELETYPE VERSION

07757 126440 GET: SUBO 1,1 ;Clear AC 1, Carry

07760 063610 SKPDN TTl

07761 000777 JMP .-1 ;Wait for Done

07762 060510 DIAS O,TiI ;Read into ACO and restart reader

07763 127100 ADDL 1,1 ;Shift Art left 4 places

07764 127100 ADDL 1,1

07765 107003 ADD O,I,SNC ;Add in new word

07766 000772 JMP GET+l ;Full word not assembled yet

07767 001400 JMP 0,3 ;Got full word, exit

07770 060110 BSTRP: NIOS TTl ;Enter here, start reader

07771 004766 JSR GET ;Get a word

07772 044402 STA 1,.+2 ;Store it to execute it

07773 004764 JSR GET ;Get another word

;This will contain an STA (first STA 1,.+1)

;This will contain JMP .-4

;BOOTSTRAP LOADER, HIGH SPEED READER VERSION

07757 126440 GET: SUBO 1,1 ;Clear ACl, Carry

07760 063612 SKPDN PTR

07761 000777 JMP .-1 ;Wait for Done

07762 060512 DIAS O,PTR ;Read into ACO and restart reader

07763 127100 ADDL 1,1 ;Shift ACI left 4 places

07764 127100 ADDL 1,1

07765 107003 ADD O,I,SNC ;Add in new word

07766 000772 JMP GET+l ; Full word not assembled yet

07767 001400 JMP 0,3 ;Got full word, exit

07770 060112 BSTRP: NIOS PTR ;Enter here, start reader

07771 004766 JSR GET ;Get a word

07772 044402 STA 1,.+2 ;Store it to execute it

07773 004764 JSR GET ;Get another word

;This will contain an STA (first STA 1,.+1)

;This will contain JMP .-4

To use the bootstrap to load the binary loader or any other program in the special format, follow these steps:

1. Put the special format tape in the reader and turn it on.

2. Press RESET.

3. For a 4K system set the data switches to 007770 (7 less than the largest address).

4. Press START.

The bootstrap loader begins at location BSTRP. After the tape is loaded the processor stops with 07775 displayed in the address lights.

Automatic Program Load

Below is the standard version of the bootstrap associated with the program load switch on the Nova 800 and Nova 1200. This program includes both the program load and channel start features of the Supernova.

To load information, first set up the device that is to be used and set its code into data switches 10-15.

For a high speed device such as magnetic tape or disk (which use the data channel), tum on data switch 0 (up); for a low speed device such as teletype or paper tape reader, tum off switch O. Then press program load. The processor will automatically deposit the contents of the read-only LS[ chips into locations 0-37 and then begin normal operation at location O.

The bootstrap reads the data switches, sets up its own 10 instructions with the specified device code, and then simulates the Supernova type operation as indicated by data switch O. If the switch is on, the boot-strap acts like the channel start procedure discussed in §2.5: it starts the device for data channel storage beginning at location 0, and then sits at location 377 executing a JMP 377 until a data word loaded into 377 causes it to do something else.

If switch 0 is off, the bootstrap reads low speed input in a manner similar to that described at the end of §2.3. The device must supply 8-bit data bytes, and each pair of bytes is stored as a single word in memory wherein the first and second bytes read become the left and right halves of the word. The program ignores tape leader, ie it does not begin storing any words until it reads a nonzero synchronization byte. The first word following the sync byte must be the negative of the total number of words to be read (including the first word), for a maximum of 192 words. The program stores the words beginning at location 100; after reading all the data, it jumps to the last word stored.

Some of the techniques used here result from the fundamental restriction that the program be no longer than thirty-two words. Time, on the other hand, is not at all critical, as it is assumed that program load will be used only when some catastrophe wipes out the binary loader at the top of memory.

00000 062677 BEG: 10RST ;Reset all 10

00001 060477 READS 0 ;Read switches into ACO

00002 024026 LOA I,C77 ;Get device mask (000077)

00003 107400 AND 0,1 ;Isolate device code

00004 124000 COM 1,1 ; - device code - 1

00005 010014 LOOP: ISZ OPI ;Count device code into all

00006 010030 ISZ OP2 ;10 instructions

00007 010032 ISZ OP3

00010 125404 INC 1,I,SZR ;Done?

00011 000005 JMP LOOP ;No, increment again

00012 030016 LOA 2,C377 ;Yes, put JMP 377 into location 377

00013 050377 STA 2,377

00014 060077 OPl: 060077 ;Start device; (NIOS 0) - 1

00015 101102 MOVL O,O,SZC ;Low speed device? (test switch 0)

00016 000377 C377: JMP 377 ;N 0, go to 377 and wait for channel

00017 004030 LOOP2: JSR GET+l ;Get a frame

00020 101065 MOVe O,O,SNR ;Is it nonzero?

3-9

00021 000017 JMP LOOP2 ;No, ignore and get another

00022 004027 LOOP4: JSR GET ;Yes, get full word

00023 046026 STA 1,@C77 ;Store starting at 100 (autoincremcnt)

00024 010100 ISZ 100 ;Count word - done?

00025 000022 JMP LOOP4 ;No, get another

00026 000077 C77: JMP 77 ;Yes - location counter and jump to last

;word

00027 126420 GET: SUBZ 1,1 ;Clear AC1, set Carry

OP2:

00030 063577 LOOP3: 063577 ;Done?: (SKPDN 0) - 1

00031 000030 JMP LOOP3 ;No, wait

00032 060477 OP3: 060477 ;Yes, read in ACO: (DIAS 0,0) - 1

00033 107363 ADDCS O,I,SNC ;Add 2 frames swapped - got second?

00034 000030 JMP LOOP3 ;No, go back after it

00035 125300 MOVS 1,1 ;Yes, swap them

00036 001400 JMP 0,3 ;Return with full word

00037 000000 0 ;Padding

The usual procedure is to use the above bootstrap to bring in a larger program that sizes memory and then reads in the binary loader, storing it at the top. The same program can be used as the bootstrap for the Supernova with the addition of a zero word (JMP 0) for location 40.

Binary Loader

A standard loader for I<.?ading program tapes in the type of object tape format generated by the assembler [refer to the assembler manual] is available in several forms. Program tape number 091-000004 (writeup 093-000003) is the binary loader for use with the manually loaded bootstrap given at the beginning of this section; 091-000036 (writeup 093-00005\) is the binary loader prefaced by the sizing and loading program for use with the Nova 800 and 1200 program load; 081-00000] (writeup 093-000003) is the binary loader prefaced by both the equivalent Supernova bootstrap and the sizing program. Following an automatic load, the operator can read an object tape on the same device simply by pressing CONTINUE. To load an object tape in any other circumstances, follow this procedure.

l. Put the object tape in the paper tape reader or teletype.

2. Set the data switches to x7777.

3. If you are using the paper tape reader, turn on data switch 0; otherwise turn it off.

4. Press START.

If a starting address is given on the object tape, control will be transferred to that location when loading is complete. Otherwise, the loader will -halt with the address lights displaying x7740, and the user must start the program from the console.

The binary loader computes a checksum over every data block and start block read. If a checksum failure occurs over a block, the loader halts with x7726 displayed in the address lights. Reposition the tape to the beginning of the last block read and press CONTINUE. If the checksum failure again occurs, the object tape is probably in error. Generate a new tape before attempting to load the program again.

3-10

Im Dokument NOVA HOW (Seite 73-78)