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

5 EXTRACODE FUNCTIONS

See Chapter 7

(1)

The double length numbers x, y, z, X, Y, are held in locations 50, 60, 70, 10, 12, respectively.

(a) Form z - (z/x)y + z/X + z/Y

(b) Form |x| + |y| + |z| in the accumulator.

(2)

Two 3×3 matrices A and B are stored in the following ways:

                                 A          B
1st row vector is stored in  10 11 12   40 41 42
2nd row vector is stored in  20 21 22   50 51 52 
3rd row vector is stored in  30 31 32   60 61 62 

Replace matrix A by matrix A + B.

(3)

The complex numbers A and B are stored as follows:

 A = u + iv is stored in 50:
 B = x + iy is stored in 60: 
 

The complex accumulator is taken as 70:

(a) Form A(B)1/2 in the complex accumulator

(b) Form (1/B) + exp. A in 50:

(4)

Write a routine to do the following in the order given:

(a) Read 160 characters from input 5 into the least significant 6 bits of halfwords starting at location 10.

(b) Pack these characters in order into full words starting at location 100.

(c) Copy the first two characters of each word, separately in order, into B registers B1 to B40.

(5)

A list of 10 numbers is held in store locations 20 onwards. Using extracode 1436 find the standard deviation of these numbers, leaving the result in the accumulator.

(6)

(a) Write a routine R3 to shift the logical accumulator circularly to the left by n character positions. Assume that n is stored in B79 upon entry and use B80 for the link.

(b) Working in the logical accumulator arrange that the floating point number in location 500 has a zero mantissa sign bit.

Answers: 5 Extracode Functions

(1a)

6) +08) +0 1504 0 0 70 1576 0 0 50 1543 0 0 60 1500 0 0 70 1556 0 0 A6 1504 0 0 70 1576 0 0 10 1556 0 0 A8 1504 0 0 70 1576 0 0 12 1500 0 0 16 1500 0 0 18a' = za' = z/xa' = -yz/xa' = z-yz/xstore in A6a' = za' = z/Xstore in A8a' = za' = z/Ya' = z/Y + z -yz/xa' = z/X + z/Y + z - yz/x

(1b)

1567 0 0 50 1556 0 0 50 1567 0 0 60 1556 0 0 60 1567 0 0 70 1500 0 0 50 1500 0 0 60

(2)

121 3 0 -2 121 1 0 0 121 2 0 301) 124 1 0 10 124 2 0 10 1430 1 0 3 201 127 3 A1

(3a)

121 1 0 70 1410 1 0 60 1462 1 0 50

(3b)

121 1 0 70 1414 1 0 60 1456 1 0 60 1402 1 0 50 1420 1 0 60 1456 1 0 50

(4a)

1050 0 0 5 121 41 0 -159D11) 1054 81 0 1A1 113 81 41 10+159D1 200 127 41 A1Call input 5Count/modifier in B41Read next characterStore

(4b)

121 41 0 100 121 42 0 10 1253 41 0 160Locate full wordsLocate charactersPack characters

(4c)

121 41 0 -19.1 121 121 0 1D12) 1250 122 41 119.1 172 121 0 40D1 220 127 121 2* 1117 0 0 0 211 127 41 3* 124 41 0 0.1 121 127 0 A2 124 41 0 0.7 121 127 0 A2Modifier in B41Set B121Write char to B-lineCount B-linesStep B121 to next B-lineEndModifier even? JumpAdd 0.1 to odd modifierContinueAdd 0.7 to even modifier

(5)

121 1 0 9 346 0 0 J41) 320 0 1 20 203 127 1 A1 1574 0 0 10 121 8 0 92) 356 0 8 30 203 127 8 A2 121 5 0 20 121 6 0 30 1431 5 0 10 121 4 0 10 1434 4 0 10 1436 4 0 10 1574 0 0 10

(6a)

R3 122 79 0 1 1265 1 0 0 124 99 1 0 203 127 79 -2* 121 127 80 0 Z

(6b)

1) -1 1601 0 0 500 1630 0 0 A1 1613 0 0 500
⇑ 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