Auxiliary Programs for the Minsk-1 Computer for Automating Task Debugging

N. S. GOLOSOV, O. K. GORDEEV
Submitted 1969 | SovietRxiv: ru-196901.10017 | Translated from Russian

Abstract Generated abstract

This paper describes two auxiliary programs developed for the Minsk-1 computer to reduce the manual effort involved in program debugging and modification. The comprehensive debugging program supports execution of specified program segments under the UIS interpreting system, with facilities for preliminary transfers, step and counter changes, logic tracing, and octal or decimal output of selected memory areas. The automatic address reworking program rearranges command and numerical arrays in memory, adjusts affected addresses, assembles a revised program, and checks exchanges with external storage. Together, the programs provide practical mechanisms for automating routine debugging operations and reducing errors in program restructuring.

Full Text

AUXILIARY PROGRAMS FOR THE “MINSK-1” COMPUTER FOR AUTOMATING TASK DEBUGGING

N. S. GOLOSOV, O. K. GORDEEV

(Presented by the scientific seminar of the TPI computing laboratory)

Experience in programming tasks for computers has shown that program debugging often constitutes one of the labor-intensive stages in solving tasks.

Often, in the course of a program’s operation, it is necessary to obtain information about the logical and computational parts of the program being debugged. In this, invaluable assistance is provided by a number of debugging programs that automate the technical part of the programmer’s labor.

Comprehensive Debugging Program (KOP)

The program is intended for debugging programs that operate with numbers represented in floating-point form and that use the interpreting system UIS [1].

The debugging program makes it possible to execute, according to a specified instruction, any segment of the program being debugged, after first carrying out certain auxiliary operations.

The information for the debugging program consists of standard lines:

1) lines specifying a segment;
2) lines of transfers;
3) lines specifying a step and a counter;
4) output lines;
5) end line.

a) Line specifying a segment

The information line has the form:

\[ \begin{array}{ccccc} \text{KOP} & I & II \\ & \text{address} & \text{address,} \\ \pm & 07 & A_{\text{н}} & A_{\text{к}} \end{array} \]

where \(A_{\text{н}}\) and \(A_{\text{к}}\) are the addresses of the beginning and end of the segment of the program being debugged. With the sign “−” in KOP, for such a line during debugging, information about the logic of the program will be output; it is output in the form of linear segments (rays), and the number of such segments if they are repeated several times in succession (in a loop) (see Example 1). With the sign “+” in KOP, the logic is not output for the information line specifying a segment.

b) Transfer-instruction lines

The information on transfers consists of two lines:

COP I address II address
±10 $A_{\text{н}}$ $A_{\text{к}}$
+00 $a_{\text{н}}$ 0000,

which specify the type of transfer and the place in the program being debugged to which codes or numbers must be transferred. The sign “+” in the COP of the first line indicates that a preliminary conversion from the decimal to the binary system of notation must be performed; the sign “−” indicates that such conversion is not necessary.

$A_{\text{н}}$ and $A_{\text{к}}$ are the beginning and end of the cells into which codes or numbers must be transferred. $a_{\text{н}}$ is the address of the beginning of the array in which the numbers or codes are located (see Example 2).

c) Step and counter line

The information line has the form

COP I address II address
+00 2000 + $\Ш$ $C$,

where $\Ш$ is the step by which readdressing will be carried out in the section of the program specified by the section-assignment line. $C$ is the counter [1]. If the step and counter need not be changed, the line has the form

$$ +00\quad 0000\quad 0000. $$

d) Output line

According to a line of the form

COP I address II address
±12 $A_{\text{н}}$ $A_{\text{к}}$

codes or numbers are output to print. The sign “+” indicates decimal output, “−” octal output. $A_{\text{н}}$ and $A_{\text{к}}$ are the initial and final addresses of the cells that must be output to print. In decimal output, the binary contents of the cells $A_{\text{н}}—A_{\text{к}}$ are preserved.

e) End line

The end line must have the form

COP I address II address
+77 7777 7777.

At this line the debugging program finishes its work.

Information lines of types 1–4 form a block. Any number of such blocks may be specified consecutively. One line of type 5 must be specified at the end of all the blocks (see Example 2). All information appearing in the block before the step-and-counter assignment line is implemented before the operation of the program section (line of type 1). Lines of the fourth type, if they follow lines of the third type, will output information only after the operation of the program section specified in this block.

The program provides for enabled octal printing, while enabling and disabling decimal printing is blocked by a stop.

The comprehensive debugging program occupies 205 cells. Before calling it, it is necessary to place, in cell 1000 at the second address, the number of the cell from which the information begins. To begin debugging, control must be transferred to cell 1000 of the COP. In the event of an emergency stop or cycling in the program being debugged, it is possible to output the information provided for the section. To do this, control should be transferred to cell 1126.

Program for Automatic Address Reworking

In the course of programming and debugging, the need arises to shift, rearrange, or discard individual arrays of commands or numbers from the program being debugged. Carrying out such processes manually is laborious mechanical work and is not guaranteed against errors, since the entire program being debugged must be reworked anew.

The program for automatic address reworking (PAPA) automatically, according to instructions, rearranges program and numerical arrays in memory. In accordance with this movement, PAPA reworks in the program the addresses belonging to the arrays being moved, composes a new program in the RAM zone, calls it, and outputs it to print.

The information for PAPA is prepared in encoded form (see Appendix 1) from lines of three types: information \(A\), \(B\), \(C\), and separators.

Information \(A\) consists of lines specifying the sections of the program where the addresses of the shifted arrays occur. These lines are written as follows:

\[ \begin{aligned} A+0)&\ --\ A_{\mathrm{n}}^{1}\quad A_{\mathrm{k}}^{1}\quad A_{\mathrm{p}},\\ A+1)&\ --\ A_{\mathrm{n}}^{2}\quad A_{\mathrm{k}}^{2}\quad A_{\mathrm{p}},\\ &\qquad \cdot\quad \cdot\quad \cdot\quad \cdot\\ &\qquad \cdot\quad \cdot\quad \cdot\quad \cdot\\ A+k)&\ --\ A_{\mathrm{n}}^{k+1}\ldots A_{\mathrm{k}}^{k+1}\ldots A_{\mathrm{p}},\\ A+k+1)&\ +\ 00\ 0000\ 0000, \end{aligned} \]

where \(A_{\mathrm{n}}, A_{\mathrm{k}}\) are the initial and final addresses of the \(k\)-th program array in the RAM, not containing constants; \(A_{\mathrm{p}}=0007\) is the flag; in \(A+k+1\) is the separator cell (zero).

Information \(B\) follows information \(A\) immediately after the separator and consists of lines for assembling the program in the RAM (lines with “\(+\)”) and reading from the RAM (lines with “\(-\)”) in the executed sequence:

\[ \begin{aligned} B+0)&\ A_{\mathrm{n}}^{1}\ldots A_{\mathrm{k}}^{1}\ldots A_{\mathrm{m}}\\ B+1)&\ A_{\mathrm{n}}^{2}\quad A_{\mathrm{k}}^{2}\quad A_{\mathrm{m}}^{2}\\ &\qquad \cdot\quad \cdot\quad \cdot\quad \cdot\quad \cdot\quad \cdot\\ B+k)&\ --\ A_{\mathrm{n}}^{k+1}\ldots A_{\mathrm{k}}^{k+1}\ldots A_{\mathrm{m}}^{k+1}\ldots\\ B+k+1)&\ --\ 00\ 0000\ 0000,\\ B+k+2)&\quad 47\ 0000\ 0000, \end{aligned} \]

where \(A_{\mathrm{n}}, A_{\mathrm{k}}\) are the initial and final addresses of the RAM from which the information is written into the RAM, if the line is “\(+\),” or from which ...

are read if the line is “—”; \(A_m\) is the MZU address from which the exchange begins. The information ends with a delimiter and a command by which PAPA terminates operation, if the command is “stop,” or transfers control to the first address, if the command is \(24\ A,\ 0000\) (it is essential that, for this command, the second address be zero).

Information \(C\) specifies the shifting of arrays located earlier from addresses \(A_n\) through address \(A_k\), with the new beginning \(A_{nn}\):

\[ C+0)\quad A_n^1 \quad A_k^1 \quad A_{nn}^1 \]

\[ C+1)\quad A_n^2 \quad A_k^2 \quad A_{nn}^2 \]

\[ \cdot\quad \cdot\quad \cdot\quad \cdot\quad \cdot \]

\[ C+k)\quad A_n^{k+1}\ \ldots\ A_k^{k+1}\ \ldots\ A_{nn}^{k+1}\ \ldots \]

\[ C+n+1)\quad 24\quad A_0+2\quad 0000. \]

At the end of the \(C\)-information, a command is placed in which \(A_0\) is the address of the beginning of PAPA.

The number of lines of each type is arbitrary, or they may be absent altogether; however, in each type of information the delimiters and service commands must be present.

PAPA begins operation from cell 0100. Before operation begins, in cells 0020 and 0021 the addresses of the beginning of the \(A\)- and \(C\)-information, respectively, must be entered as the first address.

If the machine is operating correctly, PAPA performs all actions without stops. The program checks the exchange with the MZU. If the check sums do not coincide, a stop occurs; the beginning and end of the exchange are issued to register \(A\), and the check sum to \(B\). When the machine is started, the reading of this array is repeated.

The PAPA program is self-summing. To record it correctly in the required zone, the following actions must be performed:

  1. Change the write-read constants at the end of the program.
  2. Set a stop at address 0156, start from 0141.
  3. After the stop, start from 0247.
  4. Read from cells 137, 140 (correct recording: stop \(37\ 0000\ 0020\)).

Appendix 1

Example 1. The program begins with cell 0500 and ends with cell 0570. During operation, sections 0500–0520 are repeated five times, 0521–540 once, and 0541–0570 three times.

The following beams will be issued for printing:

Operation code I address II address
00 0500 0520
00 0000 0004
00 0500 0540
00 0541 0570
00 0000 0003

Example 2. Suppose it is necessary to debug, in parts, a program occupying cells from 0400 to 0500. The debugging must be performed as follows:

  1. Before the program operates, it is necessary to send to cell 0411 the code: \(0411)\ 24\ 0420\ 0000\); send, with conversion to the binary system, into cells 0470–0500 the numbers from cells 0600–0610.

The program must run from 0400 to 450 and issue beams in this section. After the work is performed, it is necessary to print out the section of the program 0400–0460, and also issue working cells 0700–0710 with conversion to the decimal numeral system.

Complex Debugging Program (KOP)

Address KOP A₁ A₂
1000 00 0000 0000
1 —31 0001 0014
2 54 1004 1004
3 47 1000 1000
4 —17 1014 1000
5 —66 1163 1006
6 00 0000 0000
7 26 0005 1006
1010 16 0006 1116
1 —26 0000 1031
2 00 0012 1000
3 16 0007 1116
4 31 0272 0014
5 54 1033 1114
6 05 1006 1113
7 —17 1014 1031
1020 —26 1164 1021
1 00 0000 0000
2 05 1031 1131
3 —26 1170 1131
4 —06 1171 1031
5 —16 0000 1116
6 34 1031 1027
7 05 1167 1120
1030 00 0011 1031
1 00 0000 0000
2 24 1000 0000
3 06 0000 1076
4 —07 1035 1031
5 31 1006 0014
6 —37 1001 0000
7 —26 1174 1071
1040 16 0273 1116
1 54 1100 0000
2 —17 1014 1000
3 —26 1175 1045
4 00 0012 1000
5 00 0000 0000
6 —17 1001 1006
7 —36 1045 0000
1050 —26 1176 1070
1 —16 0000 1116
2 34 1056 1053

Continuation of the table

Address KOP A₁ A₂
3 05 1200 1031
4 11 0011 1177
5 24 1060 1064
6 05 1201 1031
7 05 1177 1064
1060 10 1060 0010
1 24 0112 0112
2 05 0347 1045
3 05 0314 1006
4 00 0000 0000
5 05 1031 0314
6 05 1031 0347
7 —01 1203 0131
1070 00 0000 0000
1 00 0000 0000
2 —01 1203 0131
3 05 1045 0347
4 05 1006 0314
5 00 0000 0000
6 00 0000 0000
7 24 1000 0000
1100 —16 0000 1116
1 34 1102 1110
2 05 1202 1031
3 05 1204 1076
4 47 0005 0005
5 —16 1176 1006
6 —36 0222 0000
7 24 1057 1070
1110 —17 1001 1006
1 —36 1166 0000
2 24 1053 1070
3 00 0000 0000
4 10 1114 0010
5 24 0112 0112
6 00 0000 0000
7 —16 1113 0300
1120 24 0112 0112
1 05 1165 0113
2 05 0000 1070
3 05 0001 1064
4 —17 1001 1113
5 24 0112 1071

Continuation of the table

Address KOP A₁ A₂
6 −46 0000 1064
7 −46 0000 1070
1130 −46 1113 1076
1 00 0000 0000
2 05 1144 0113
3 05 1114 1120
4 24 1000 0000
5 16 0005 0112
6 −27 1001 1076
7 31 0012 0000
1140 −31 1071 0000
1 54 1146 1146
2 03 1076 1071
3 −16 0000 0116
4 36 0225 0000
5 34 0114 0114
6 −06 1071 1113
7 −31 1064 0000
1150 54 1153 1153
1 10 0012 1070
2 24 1161 1070
3 −46 0000 1046
4 11 1070 0000
5 34 1160 1156
6 −46 0000 1070
7 26 0000 1070
1160 05 1113 1064
1 −17 1014 1076
2 24 1142 1113
3 05 0000 1116
4 05 0000 1021
5 24 1135 0000
6 −40 0000 2000
7 24 1121 0112
1170 05 1021 0000
1 05 1172 0000
2 24 1131 0000
3 24 1126 0000
4 06 3070 0000
5 05 0000 1045
6 −05 2000 2000
7 05 2002 1075

Continuation of the table

Address KOP A₁ A₂
1200 24 0116 0000
1 24 0323 0000
2 24 0324 0000
3 00 0000 0064
4 47 0006 0006

PAPA Program

Address KOP A₁ A₂
0100 10 0020 0241
1 24 0103 0103
2 00 0255 0103
3 00 0000 0000
4 34 0111 0111
5 10 0021 0241
6 24 0110 0110
7 00 0255 0110
0110 00 0000 0000
1 36 0260 0000
2 −27 0231 0245
3 16 0257 0120
4 −27 0153 0246
5 16 0261 0120
6 −26 0000 0244
7 54 0200 0172
0120 00 0000 0000
1 11 0117 0000
2 20 0256 0117
3 34 0102 0102
4 05 0123 0161
5 05 0264 0137
6 05 0251 0140
7 34 0134 0000
0130 05 0000 0161
1 −01 0263 0244
2 05 0265 0137
3 05 0253 0140
4 00 0244 0137
5 10 0245 0246
6 20 0140 0140
7 04 0040 0100
0140 04 0100 0267
1 05 0243 0147
2 −17 0152 0246
3 −26 0147 0147

Continuation of the table

Address COP A₁ A₂
4 05 0000 0120
5 34 0147 0147
6 01 0254 0147
7 00 0000 0000
0150 24 0151 0120
1 56 0261 0147
2 −31 0245 0014
3 −54 0146 0010
4 16 0252 0147
5 54 0102 0102
6 −11 0120 0267
7 54 0164 0164
0160 −06 0263 0157
1 37 0266 0020
2 60 0252 0147
3 34 0142 0142
4 −01 0263 0157
5 34 0170 0166
6 47 0140 0120
7 −01 0233 0157
0170 05 0120 0267
1 34 0132 0132
2 −17 0152 0246
3 −26 0242 0250
4 −16 0241 0246
5 −26 0000 0247
6 −16 0242 0245
7 24 0105 0266
0200 −17 0214 0244
1 21 0246 0247
2 05 0247 0205
3 05 0250 0233
4 05 0000 0161
5 00 0000 0000
6 25 0262 0137
7 56 0261 0120
0210 24 0211 0140
1 11 0137 0246
2 54 0217 0213
3 −17 0152 0137
4 31 0245 0014
5 54 0217 0216
6 00 0147 0161

Continuation of the table

Address COP A₁ A₂
7 −17 0214 0140
0220 31 0246 0000
1 54 0222 0226
2 11 0245 0140
3 54 0226 0224
4 −17 0152 0147
5 20 0161 0161
6 −16 0000 0120
7 34 0230 0232
0230 20 0161 0120
1 −34 0233 0012
2 21 0161 0120
3 00 0000 0000
4 11 0266 0233
5 34 0107 0236
6 00 0235 0205
7 10 0254 0233
0240 24 0204 0233
1 05 0000 0120
2 05 0120 0000
3 −10 0120 0000
4 00 0000 0100
5 00 0000 0267
6 00 0100 0000
7 −11 0120 0263
0250 24 0125 0266
1 04 0000 0000
2 −40 0000 0000
3 44 0000 0000
4 00 0000 0001
5 00 0001 0000
6 00 0054 0042
7 77 7400 0000
0260 00 0377 6000
1 −00 0000 1777
2 00 1777 0000
3 −00 0000 0000
4 04 0040 0000
5 44 0040 0000
6 −44 7130 5373
7 00 0000 0000
  1. Execute the program segment 0450–0467 without making any preliminary transfers, but only by changing the step and setting the counter: \(SH = 4\), \(C = 0024\). After executing the segment, print the working cells 0720–0722. End debugging.

The information for such debugging should have the following form:

COP I address II address
− 07 0400 0450
− 10 0411 0411
+ 00 0611 0000
+ 10 0470 0500
+ 00 0600 0000
00 0000 0000
− 12 0400 0460
12 0700 0710
07 0451 0467
00 2004 0024
12 0720 0722
77 7777 7777

Appendix 1

The digit grid of the Minsk-1 machine makes it possible to record three addresses in one cell. This record also forms an information line for PAPA.

In each address only \(10_{10}\) binary digits are occupied. By shifting the first address two binary digits to the right, we free \(10_{10}\) binary digits for \(A_n\). The information must be written first in the three-address system and then coded.

References

N. S. Golosov, O. K. Gordeev. Universal Interpreting System (UIS). In the present collection.

Submission history

Auxiliary Programs for the Minsk-1 Computer for Automating Task Debugging