Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ ContentsIntroduction0. Introductory exercises1. Basic operations2. Modification, counting and testing3. B-register operations4. Accumulator operations5. Extracode functions6. Input and output operations7. Magnetic tape operations8. Advanced programming techniques9. Complete programs
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureAtlas manualsABL Exercises :: ATLAS 1 COMPUTER ABL PROGRAMMING EXERCISES
ACLLiteratureAtlas manualsABL Exercises :: ATLAS 1 COMPUTER ABL PROGRAMMING EXERCISES
ACL ACD C&A INF CCD CISD Archives
Further reading

Contents
Introduction
0. Introductory exercises
1. Basic operations
2. Modification, counting and testing
3. B-register operations
4. Accumulator operations
5. Extracode functions
6. Input and output operations
7. Magnetic tape operations
8. Advanced programming techniques
9. Complete programs

7 MAGNETIC TAPE OPERATIONS

See Chapter 9

7.1 Fixed Length Transfer

(1)

Transfer 5 blocks of information from tape 2 beginning at block 1 into store blocks 10 onwards.

(2)

Read blocks 5, 4 and 3 of tape 1 to store blocks 3, 2 and 1 respectively.

(3)

Four blocks of information are stored on tape 1 in blocks 1 onwards. Transfer each half word into a separate full word location in the store starting from store; location 100.

(4)

Information is stored in blocks 1-5 inclusive in the store. Write blocks 1 and 2 into blocks 4 and 5 of tape 1, block 3 into block 7 of tape 1 and blocks 4 and 5 into blocks 1 and 2 of tape 1 respectively. The write operations should be performed in the order given.

(5)

Read block 5 of tape 1 into store locations starting at 1: Write this block back to the same block on tape 1 but reverse the order of the words in the block.

(6)

Write 10 blocks from A1 to the 10 sections from that whose number is held in B1, on the tape whose number is held in B2 as a half word address (use substitution register B121).

(7)

Tapes 1 and 2 are stationed at unknown positions P1 and P2. Reposition the tapes at sections [(P1+P2)/2]. (The square brackets indicate that the integral part of the expression is required.) Transfer 100 blocks from tape 1 sections [(Pl+P2)/2]-i, where i goes from 1 to 100, to tape 2 sections [(Pl+P2)/2]+j, where j goes from 0 to 99.

7.2 Variable Length Transfers

(1)

Search for word 173 of section 7 of tape 6.

(2)

Using a buffer in blocks six and seven of the store write 750 words from A3 to the beginning of tape two, preceded by a '7' marker and followed by a '1' marker.

(3)

As (2) but precede information by a '3' marker and follow it by a '4' marker.

(4a)

Search for word 6, section 4 of tape 3, where a marker is located.

(4b)

Set up a buffer for reading from tape 3 in the first available block after A6.

(4c)

Read 100 words to A1, Assume first string has more than 100 words.

(4d)

Read to A2 until a marker of order ≥3 is encountered.

(4e)

Read not more than 200 words to A4, stopping if a marker ≥4 is encountered.

(5)

Place a '3' marker at word 3 of block 100 of tape 4 without any further alteration of the tape. A marker already exists at this point. The string following the '3' marker is entirely contained in block 100.

(6)

Transfer the first and fourth strings of information on tape 3 to consecutive store locations beginning at A2 (set up a two block buffer at some convenient point).

(7)

Read the record preceding the present position of tape 6 to store locations ending with 315.

(8)

Read the first 700 words from tape one, which has been written by fixed block transfers.

(9)

The following three operations are to be performed consecutively on tape one.

a. Read the first string from tape one to locations starting with 1300:

b. Write 160 words from A7 onwards to tape 1 preceded by a '7' marker and followed by a '3' marker. The '7' marker should go in the fourth word of section 100. Leave the remaining 350 words of section 10 as they are.

c. Read the second string from tape one to store locations beginning at 1400:

(10)

Write a subroutine to read the next string from tape 4 into locations starting from the address held in B5. Assume that other tapes may be in use for variable length operations. The read buffer for tape 4 has been set up by the main program. The link is in B90.

Numbers (11) and (12) are two parts of the same problem.

(11)

There are 100 strings of non-zero floating-point numbers stored consecutively from main store location 1600: and there are floating-point zeros between the strings and after the last one. Store these strings as variable length records on tape 3 starting at the 200th word of section 26. Place '7' markers between the records and at both ends. Store the locations of the markers, excluding the first one, in the full words from 1500: in the form required by the word search instruction. Exit to the address stored in half word 1.4.

(12)

Suppose that the first half word of each of the 100 strings is a keyword which uniquely identifies that string. Write a subroutine to search through the 100 strings on tape 3 for the string whose keyword is contained in B10 and to place that string - keyword included - in consecutive locations beginning at the address contained in half word A3/2. If no string with that keyword is found exit to b90 with b127 odd. If the search is successful exit to b90 with b127 even. Assume that tape 3 is already selected and aligned on the marker at the beginning of the 100 strings. Leave the alignment on exit in A/3. The read buffer has been set up. B90 is even on entry.

Answers: 7.1 Fixed Length Transfers

(1)

1001 2 0 1 1002 2 0 10:0.4SearchRead forwards

(2)

1001 1 0 6 1003 1 0 1:0.2SearchRead backwards

(3)

1001 1 0 1 1002 1 0 10:0.3 121 1 0 Y4-4: 121 2 0 01) 101 3 1 14:-Y4 113 3 2 100 124 2 0 1 200 127 1 A1 1117 0 0 0SearchRead four blocksTransfer half-words to storeCount and repeat

(4)

1001 1 0 4 1004 1 0 1:0.1 1005 1 0 0 1004 1 0 3:1) 1006 1 0 Y7 1004 1 0 4:0.1SearchWrite 1 and 2Move forwardsWrite 3Move backwardsWrite 4 and 5

(5)

1001 1 0 6 1003 1 0 1: 121 1 0 511 121 2 0 06) 334 0 2 1: 356 0 1 2: 124 2 0 1 203 127 1 A6 1004 1 0 2:SearchRead backwardsReverse words of blockCount and repeatWrite reversed block

(6)

121 121 2 0 1001 122 1 0 1004 122 0 Y4A1 1004 122 0 5:A1Y4Section b1, tape b121Write first fiveThen second five

(7)

1) +0 2)+0 A10=10: A11=15: 1024 1 0 A1 1024 2 0 A2 101 1 0 A1 104 1 0 A2 163 1 0 0 1001 1 1 0 1001 2 1 0 121 4 0 -9 1003 1 0 0.4A1020) 1003 1 0 0.4A11 121 3 0 4: 1004 2 3 A10 122 3 0 1: 216 127 3 -2* 214 127 4 2* 1003 1 0 0.4A10 121 3 0 4: 1004 2 3 A11 122 3 0 1: 216 127 3 -2* 201 127 4 A20Read P1Read P2Compute [(P1 + P2)/2]Search to [(P1 + P2)/2]Read five blocksRead next fiveWrite five blocks inreverse orderAvoid unnecessary readRead next five blocksWrite five blocks inreverse orderCount and repeat

Answers: 7.2 Variable Length Transfer Solutions

(1)

3) H7, 173 1044 6 0 A3

(2)

1) H1, 0 1044 2 0 A1 1032 2 0 6:0.1 121 1 0 750.1 1040 1 0 A3

(3)

1) H1, 0 1044 2 0 A1 1032 2 0 6:Y1 1042 0 0 Y3 121 1 0 750.4 1040 1 0 A3

(4a)

3) H4, 6 1044 3 0 A3

(4b)

1030 3 0 A6B1:

(4c)

121 4 0 100 1040 4 0 A1

(4d)

121 2 0 Y3 1040 2 0 A2

(4e)

121 2 0 200.4 1040 2 0 A4

(5)

1) H100, 3 1044 4 0 A1 1030 4 0 10: 1041 0 0 0 1031 4 0 10: 1041 0 0 0 1032 4 0 10: 1042 0 0 Y3 1043 0 0 0Search for markerRead block 100Pick up marker by skipRead backwardSkip back to markerWriteMarkStop variable length

(6)

1) H1, 0 1044 3 0 A1 1030 3 0 (*+2:)BY1 121 1 0 0 1040 1 0 A2 1041 0 0 0 1041 0 0 0 1040 0 0 A2SearchSet up read bufferGet length of stringSkip second stringSkip third stringRead fourth string

(7)

1031 6 0 13: 1040 0 0 315

(8)

2) H1, 0 1044 1 0 A2 1034 1 0 10:Y1 121 1 0 700 1040 1 0 A10

(9a)

1) H1, 0, 100, 4, +0 1044 1 0 A1 1030 1 0 6: 1040 0 0 1300: 1024 1 0 2A1SearchFill read bufferRead recordStore position

(9b)

1044 1 0 1A1 1030 1 0 6: 1041 0 0 0 1031 1 0 6: 1041 0 0 0 1032 1 0 6: 1042 0 0 0.7 121 2 0 160.3 1040 2 0 A7SearchRead block 100Pick up marker by skipRead backwardsSkip backWrite modePlace '7' markWrite a string

(9c)

1044 1 0 2A1 1030 1 0 6: 1040 0 0 1400:SearchFill read bufferRead second record

(10)

1036 1 0 A1 217 127 1 *+4 124 1 0 J1033U2 113 1 0 A6 121 1 0 0 1033 4 0 0 1040 0 5 0 217 127 1 2*6) 1033 0 0 0 121 127 90 0Pick up selected tapeJump if none selectedPlant 'select' instructionSelect tape 4Read next stringRe-selectReturn

(11)

H1) 26,200 1044 3 0 A1 1032 3 0 1200:Y1 121 2 0 1600:-1 121 3 0 -992) 121 4 0 0 124 2 0 1 324 0 2 0 234 127 0 3* 124 4 0 1 121 127 127 -5 121 5 2 0 122 5 4 0 124 4 0 Y7 1040 4 5 0 1024 3 3 1500:99 201 127 3 A2 101 127 0 1.4SearchRead bufferStart pointerSet count (strings)Clear count (numbers)Pick upnext numberJump if end of stringCount numbersRepeatPoint to head ofstring in B5Add markerWrite stringStore marker positionCount stringsExit

(12)

121 3 0 99 101 4 0 A3/21) 1040 0 4 0 101 5 4 0 122 5 10 0 215 127 5 3* 1024 3 0 A/3 121 127 90 0 203 127 3 A1 1024 3 0 A/3 121 127 90 Y1Count in B3Pick up string addressRead next stringPick up keywordSubtract b10Jump if keys not equalStore alignment of tapeExit with b127 evenJump if more recordsStore tape alignmentExit with b127 odd
⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site