(1)
Read block A1 to the operands side of the core store, duplicate it as A2 on the drum, rename block A1 as A3. Release A3 to the drum and lose A2.
(2)
Achieve the sane final result as (1) by any more efficient method.
(3)
A list of numbers extends from location A1 to location A2. A1 is the first word of a block and A2 is the last word of another, higher numbered, block. The list may be of considerable length. It is required to find the sum of the products of pairs of consecutive numbers in the list, and once this is done the list will not be needed again. Program this efficiently. The final result is to be left in location A10 and the possibility of exponent overflow can be disregarded. Set A1, A2 and A10 explicitly for a list containing 512 × P1 numbers.
(4)
100 blocks of main store labelled consecutively A10, A10+1:, ..... A10+99: are processed one at a time starting with A10 and working up to A10+99:. The processing takes about 10 milliseconds and the results for any block, A10+n say, must go to block A11+n, for all n. The original block is not wanted again after A11+n has been filled. Program the process efficiently for a block allocation of 102.
(5)
A bad programmer has abandoned a routine for evaluating sin α for values of α from 0° to 90° with an interval between adjacent values of 0.000175784868°. He has written all these values (in radians) sequentially into 100 blocks of the main store starting at location 10:0. He wishes to overwrite these arguments with sin α. Can you finish his routine using the original list of α's and the store extracodes? The link is to be in B40.
(1)
A magnetic tape with programmer's number 1 contains records of the sales of various types of goods stocked by one store of a chain. Each type of article has one 512 word section to itself. The first half-word of each section is 3, which is a code number for the store, and the second half-word is a code word for the type of article.
A second tape, with programmer's number 2, contains corrections of sales information for all stores of the chain, one section being allocated per store for each type of article for which alteration is necessary. The same convention as the first tape is used for the first half-word of each section, which varies according to the store concerned. The remainder of the section, however, is not in the required form and must be processed by a subroutine R5 whose specifications are given below. The second half-word of the processed section will be the same as that of the block it has to replace.
The sections for one type of article on the amendments tape are grouped together, the order of types being the same as that of the sales record tape. The last useful section of the amendments tape is followed by a section with zero in the first half-word.
Write a program, using three branches, to amend the necessary sections of the first tape.
a. Link in B90.
b. Operates on one block of information, beginning at 2:
c. Produces a block suitable for transfer to sales tape in block 3:
d.Entry point at first instruction
e. Uses B-registers B10 to B20.
(1)
Arrange that the program jumps to the routine beginning at location A3 when the last item has been read from a data tape.
(2)
Arrange that if a fault occurs the contents of store locations A1+1, A1+2 and A1+3 will be printed out in floating point form to 10 significant digits on separate lines by a private monitor routine which will be entered after printing the type of fault. After the private monitor, terminate the program.
(3)
Write a routine to determine the first integer K, greater than 2, for which sin K > 1-1/K, limiting the routine to no more than 5 seconds by means of the local instruction counter. If the search is successful print K on a newline as an integer on output 0 and exit to the first word of the next block. If the 5 seconds elapses before the first K is found, print "NO K FOUND UP TO" followed on the same line by the value of K at that moment. Then jump to the address held in half-word 74.4.
(4)
Write 20 consecutive blocks, starting at block 40: to tape 4, beginning at the present position of the tape (assuming that this is at the beginning of a block). If tape 4 holds all the blocks, end the program; otherwise, place the remaining blocks on tape 5. Print on a new line on output 0 the number of blocks which overflowed and end the program.
(5)
Information is stored on tape 2 starting at the 1st word of block n (n is stored in B2 in the 21-bit position). Every 10th one of these blocks, beginning with the first, must be read in turn into store block 10: and then processed by routine R4. Arrange to enter label 6 of routine R5 when the end of the tape is reached. Routine 4 is entered at A1/4, with the link in B90.
(1)
(2)
(3)
(4)
(5)
(1)
(2)
(3)
(4)
(5)