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.
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
Assume the numbers 75 (=x) and 83 (=y) are given addresses as follows:
* = 100 +75 +83
Write instructions to perform the following operations:
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
121 2 0 1000000 | b2' = 1000000
123 25 0 10 | b25' = -10
124 3 0 20 | b3' = b3 + 20
121 36 0 0 | b36' = 0
122 80 0 9 | b80' = b80 - 9
121 12 13 1000000 | b12' = b13
122 5 6 0 | b5' = b5' - b6
124 8 9 0 | b8' = b8 + b9
121 2 3 0 | b2' = b3
121 7 9 0 | b7' = b9
124 40 40 0 | b40' = b40 + b40
121 61 60 0 | b61' = b60 124 60 61 0 | b60' = b60 + b61 121 60 61 0 | b60' = b60 + b61
120 21 0 70 | b21' = 70 - b21
120 40 0 -3 | b21' = -3 - b40
120 20 70 0 | b20' = b70 - b20
113 20 0 200.4 | (200.4)' = b20
101 9 0 6.4 | b9' = (6.4)
110 13 0 3 | (3)' = (3) - b13
104 70 0 3.4 | b70' = b70 + (3.4)
102 35 0 3 | b35' = b35 - (3)
102 6 0 31 | b6' = b6 - (31) 113 6 0 31.4 | (31.4)' = b6
102 6 0 31 | b6' = b6 - (31)
122 6 0 31 | b6' = b6 - 31
122 6 0 31 | b6' = b6 - 31 113 6 0 31.4 | (31.4)' = b6
113 5 0 31.4 | (31.4)' = b5 123 8 5 0 | b8' = -b5
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
121 127 0 10000 | b127' = 10000
122 127 0 4 | b127' = b127 - 4
124 127 0 4 | b127' = b127 + 4
121 127 61 0 | b127' = b61
101 127 0 900.4 | b127' = (900.4)
121 31 127 0 | b31' = b127
113 127 0 3726.4 | (3276.4)' = b127
* = 0
* = 1000:
* = 600:9
* = * + 6000
* = * + 512
* = *B + 1: or 1:*B
* = *B + 2:299 or 2:299*B
325 0 0 100
324 0 0 101
324 0 0 101 320 0 0 100
324 0 0 100 321 0 0 101 356 0 0 101
324 0 0 100 362 0 0 101
320 0 0 101
374 0 0 100
363 0 0 101
* = 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