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

0 INTRODUCTORY EXERCISES

A. (See Chapter 4)

Translate the following verbal instructions into machine instructions and give the symbolic description of each instruction. Thus place 125 in B14 requires the solution.

    121   14     0     125      |   b14' = 125

The vertical line separating the instruction from its symbolic description can actually be used in an ABL program to permit explanatory comments to appear on the program print-out. The ABL compiler will compile the instruction but ignore the comments.

Exercises

  1. Set b2 (contents of B2) to one million
  2. Put -10 in B25
  3. Add twenty to b3
  4. Clear B36 (set b36 to zero)
  5. Subtract 9 from b80
  6. Transfer b13 to B12
  7. Decrease the contents of B5 by b6
  8. Increase b8 by b9
  9. Replace b2 by b3
  10. Overwrite the contents of B7 with b9
  11. Double the contents of B40
  12. Treble the contents of B60
  13. Negate b21 and add 70
  14. Negate b40 and subtract 3
  15. Negate b20 and add b70
  16. Plant b20 in the right half of full word 200
  17. Pick up the right half of word 6 in B9
  18. Decrease the left half of word 3 by b13
  19. Increase the contents of B70 by the right half of word 3
  20. Decrease b35 by (3)
  21. Place the difference between b6 and (3l) in word 31 (right half)
  22. Place the difference between b6 and (31) in B6
  23. Place the difference between b6 and 31 in B6
  24. Place the difference between b6 and 31 in word 31 (right half)
  25. Plant the contents of B5 in 31.4, then pick up -b5 in B8
  26. Interchange the two halves of word 430
  27. Jump to word 10000
  28. Jump back 3 instructions
  29. Jump forward 5 instructions
  30. Jump to the address held in B61
  31. Jump to the address held in the right half of word 900
  32. Store the current value of control in B31
  33. Store the current value of control in 3726.4

B. (See Chapter 5.8)

The following exercises concern ABL proper.

The ABL star directive:

* = an address

is used to specify the address where the next item of program is to be stored. Thus

* = 200:3

    121   36     0     4        |   b36' = 4

will cause the instruction (but not the 'comment') to be stored in the fourth word (the words are numbered 0, 1, 2, 3, ...) of block 200. As each item is stored the value of * is increased by an appropriate amount to be ready for storage of the next item. Thus

* = 40

 H20, 6, -35

leaves the three numbers stored in half words 40, 40.4 and 41 and leaves * set to 41.4. However, instructions can only be stored in the two halves of the same word. This means that in the piece of program

* = 40

 H20, 6, -35
     101   25     0     40.4      |   b25' = 6

The value of * is automatically stepped on to 42 before the 101 instruction is stored.

One may leave 'blank' space in one's program by setting * ahead by the number of words which one wishes to skip over (the words skipped will contain floating point zeros). Thus

* = * + 50 

will cause the next item to be stored 50 words beyond the previous item.

Write an ABL star directive that would cause a floating point number following it to be stored in

Exercises

  1. The first word of the store (answers * = 0)
  2. The first word of block 1000 (i.e. word 0 of that block)
  3. The tenth word of block 600
  4. 6000 words beyond the current value of *
  5. One block further on
  6. Word 0 of the next block
  7. The 300th word of the next block but one

C. Exercises

Assume the numbers 75 (=x) and 83 (=y) are given addresses as follows:

* = 100 
+75 
+83

Write instructions to perform the following operations:

Exercises

  1. Put -x in the accumulator
  2. Put y in the accumulator
  3. Put y+x in the accumulator
  4. Store x-y in word 101
  5. Put x times y in the accumulator
  6. Add y to the accumulator
  7. Divide the accumulator by x
  8. Negate the accumulator and multiply by y

D. Exercises

Write a piece of ABL program which would be compiled into block 1312 as follows:

1 full word containing:
0
-1
-3 0
'3' 3 '1' 'Z' 0 1 'A' '/'
'0' skip 2.7
skip
13
skip -25
    121   1      0     2 
    1117  0      0     0 
0
skip 0.7

1 means the actual binary number 1

'1' means the internal code character which represents the number 1

Answers A

  1.      121   2      0     1000000      |   b2' = 1000000
    
  2.      123   25     0     10           |   b25' = -10
    
  3.      124   3      0     20           |   b3' = b3 + 20
    
  4.      121   36     0     0            |   b36' = 0
    
  5.      122   80     0     9            |   b80' = b80 - 9
    
  6.      121   12     13    1000000      |   b12' = b13
    
  7.      122   5      6     0            |   b5' = b5' - b6
    
  8.      124   8      9     0            |   b8' = b8 + b9
    
  9.      121   2      3     0            |   b2' = b3
    
  10.      121   7      9     0            |   b7' = b9
    
  11.      124   40     40    0            |   b40' = b40 + b40
    
  12.      121   61     60    0            |   b61' = b60
         124   60     61    0            |   b60' = b60 + b61
         121   60     61    0            |   b60' = b60 + b61
    
    
  13.      120   21     0     70           |   b21' = 70 - b21
    
  14.      120   40     0     -3           |   b21' = -3 - b40
    
  15.      120   20     70    0            |   b20' = b70 - b20
    
  16.      113   20     0     200.4        |   (200.4)' = b20
    
  17.      101   9      0     6.4          |   b9' = (6.4)
    
  18.      110   13     0     3            |   (3)' = (3) - b13
    
  19.      104   70     0     3.4          |   b70' = b70 + (3.4)
    
  20.      102   35     0     3            |   b35' = b35 - (3)
    
  21.      102   6      0     31           |   b6' = b6 - (31)
         113   6      0     31.4         |   (31.4)' = b6
    
  22.      102   6      0     31           |   b6' = b6 - (31)
    
  23.      122   6      0     31           |   b6' = b6 - 31
    
  24.      122   6      0     31           |   b6' = b6 - 31
         113   6      0     31.4         |   (31.4)' = b6
    
  25.      113   5      0     31.4         |   (31.4)' = b5
         123   8      5     0            |   b8' = -b5
    
  26.      101   1      0     430          |   b1' = (430)
         101   2      0     430.4        |   b2' = (430.4)
         113   1      0     430.4        |   (430.4)' = b1
         113   2      0     430          |   (430)' = b2
    
  27.      121   127    0     10000        |   b127' = 10000
    
  28.      122   127    0     4            |   b127' = b127 - 4
    
  29.      124   127    0     4            |   b127' = b127 + 4
    
  30.      121   127    61    0            |   b127' = b61
    
  31.      101   127    0     900.4        |   b127' = (900.4)
    
  32.      121   31     127   0            |   b31' = b127
    
  33.      113   127    0     3726.4       |   (3276.4)' = b127
    

Answers B

  1.      * = 0
    
  2.      * = 1000:
    
  3.      * = 600:9
    
  4.      * = * + 6000
    
  5.      * = * + 512
    
  6.      * = *B + 1:  or 1:*B
    
  7.      * = *B + 2:299  or  2:299*B
    

Answers C

  1.      325   0      0     100         
    
  2.      324   0      0     101         
    
  3.      324   0      0     101      
         320   0      0     100      
    
  4.      324   0      0     100    
         321   0      0     101
         356   0      0     101
    
  5.      324   0      0     100      
         362   0      0     101      
    
  6.      320   0      0     101     
    
  7.      374   0      0     100      
    
  8.      363   0      0     101    
    

Answers D

* = 1312:
+0, -1, H -3,  0,  S K23,   3,  K21
S K72,  0, 1,  K41,  K17,  K20
H 2.7, *=*+1,  F +13,   *=0.4*,  H -25
121      1      0      2
1117     0      0      0
+0, *=0.4*, H 0.7
⇑ 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