This page contains the output of a small ALGOL program that demonstrates the BESM-6 compilation and execution environment as well as ALGOL parameter passing semantics (passing parameters "by name"). The input batch and the listing were modified slightly to remove occasional Cyrillic characters in the titles and control cards; the system messages are in English as the "Dubna" monitor system was designed for use at the Joint Institute for Nuclear Research in Dubna city near Moscow.

Do not be surprized by the capital letters in the output; the character layout did not have any lower case letters

Below is how the input batch looked like (I've used lower case for reading convenience). The first two lines (punchcards) are processed by the OS kernel, called DISPAK (DISpatcher of PAcKets). They specify the user ID (419999), the monitor system to process the following cards (ZCX was the code for a particular release of the "Dubna" monitor system), and the CPU time limit (30 seconds). "EE" is the end of the header, and "B1A3" is the mode for the following punchcards: raw bitmap mode. I'll explain later why this is important.


USER 419999 ZCX^
TIME 30^
EEB1A3
*name algol
*     all control statements start with *
*     the first control statement must be '*name'
*     an asterisk and 5 spaces introduces a comment
*     only 5 characters after the asterisk are significant
*
*illegal statements are warned about and ignored
*
*algol      <-- tells that the following non-control
*               lines must be given to the algol translator
*               (the default is fortran)
*
*punch      <-- requests dumping the object modules
*               to punch cards
*
*     unless '*no list' is present, the annotated program listing
*     is printed
*

'begin'
        'comment'
        this program demonstrates passing parameters by name ;
        'integer' x, y;
        'procedure' sub(a, b);
        'integer' a, b;
        'begin'
                x := 5;
                print(''First in sub : a='', a, '' b='', b, newline);
                a := 7;
                print(''Second in sub: a='', a, '' b='', b, newline);

        'end';
        x := 7;
        y := 11;
        sub(y, x + y);
        print(''After sub    : x='', x, '' y='', y, newline);
'end'
'eop'
*     when a non-control line is encountered, a compiler
*     takes over and keeps reading until it decides to stop,
*     or the end of the packet is reached
*
*     the '*execute' statement requests linking and running the executable
*     the input data, if any, goes after *execute
*
*     unless '*no load list' is present, the symbol table is printed
*execute
*end file
``````
EKONEC

The *end file line is the last one read by the MS "Dubna"; the next card, represented here by 6 back-ticks, in reality was a special card denoting the end of raw bitmap input sequence, called "Dispatcher's end". It had all holes punched in columns 1 and 41.

The last card denotes the end of the input batch to the dispatcher (E is the "end of data segment" mark for the OS, and "KONEC" is "end" in Russian).

This is the output:



                                                      26.07.03 M1

  M O N I T O R-8 0  (3.6)   26.11.83M       (  MS " D U B N A " IAE  )             USER    419999000000

                     WWW  W      WWW   WWW  W
                    W   W W     W   W W   W W
                    W   W W     W     W   W W
                    W   W W     W     W   W W
                    W   W W     W  WW W   W W
                    WWWWW W     W   W W   W W
                    W   W WWWWW  WWW   WWW  WWWWW


*NAME ALGOL
           *     ALL CONTROL STATEMENTS START WITH *
           *     THE FIRST CONTROL STATEMENT MUST BE '*NAME'
           *     AN ASTERISK AND 5 SPACES INTRODUCES A COMMENT
           *     ONLY 5 CHARACTERS AFTER THE ASTERISK ARE SIGNIFICANT
           *
           *ILLEGAL STATEMENTS ARE WARNED ABOUT AND IGNORED
ILLEGAL SYSTEM CARD
           *
           *ALGOL      <-- TELLS THAT THE FOLLOWING NON-CONTROL
           *               LINES MUST BE GIVEN TO THE ALGOL TRANSLATOR
           *               (THE DEFAULT IS FORTRAN)
           *
           *PUNCH      <-- REQUESTS DUMPING THE OBJECT MODULES
           *               TO PUNCH CARDS
           *
           *     UNLESS '*NO LIST' IS PRESENT, THE ANNOTATED PROGRAM LISTING
           *     IS PRINTED
           *

26.07.03 M1 A L G O L - G D R (25.01.79)CB-K 1. 'BEGIN' 2. 'COMMENT' 3. THIS PROGRAM DEMONSTRATES PASSING PARAMETERS BY NAME ; 4. 'INTEGER' X, Y; 5. 'PROCEDURE' SUB(A, B); 6. 'INTEGER' A, B; 7. 'BEGIN' 8. X := 5; 9. PRINT(''FIRST IN SUB : A='', A, '' B='', B, NEWLINE); 10. A := 7; 11. PRINT(''SECOND IN SUB: A='', A, '' B='', B, NEWLINE); 12. 'END'; 13. X := 7; 14. Y := 11; 15. SUB(Y, X + Y); 16. PRINT(''AFTER SUB : X='', X, '' Y='', Y, NEWLINE); 17. 'END' 18. 'EOP' LINE ADDRESSES(OCTAL) 1 2 3 4 5 6 7 8 9 0 1 - 10 00001 00001 00003 00003 00004 00015 11 - 18 00016 00030 00032 00033 00042 00051 00051 >>> PROGRAM <<< LENGTH: 65 (00101) TIME: 0,00 SEC. (CP: 0,00 SEC.) ALGOL-COMPILER 16.IV.75 * WHEN A NON-CONTROL LINE IS ENCOUNTERED, A COMPILER * TAKES OVER AND KEEPS READING UNTIL IT DECIDES TO STOP, * OR THE END OF THE PACKET IS REACHED * * THE '*EXECUTE' STATEMENT REQUESTS LINKING AND RUNNING THE EXECUTABLE * THE INPUT DATA, IF ANY, GOES AFTER *EXECUTE * * UNLESS '*NO LOAD LIST' IS PRESENT, THE SYMBOL TABLE IS PRINTED *EXECUTE PROGRAM 01000 A/PROCRT E 01512 MON*ITOR 02051 A/STOP 01101 A/PARCON E 01535 PLBEG E 02060 A/START E 01105 A/PARVAR E 01544 PLCLO E 02066 A/DRUCK 01161 A/PARPAR E 01555 ASAVE* E 02074 A/IPRI E 01213 A/PARVAL E 01564 SAVE*HID E 02101 A/RPRI E 01245 A/PAREXP E 01571 FOR*ALL E 02116 A/BPRI E 01301 A/PARLAB E 01602 OH* E 02120 A/SPRI E 01310 A/PARSTR E 01611 OH*1 E 02125 A/LPRI E 01325 STOP* 01622 ISO/GOST 02134 A/NLINE E 01371 A/ARRD/K 01643 PRINT8* 02203 A/NPAGE E 01373 A/ARRD/V E 01646 FREE 02251 A/I*ISO E 01446 STOPFLG* C 01736 A/R*ISO E 01451 PRINT8 01737 A/CALLP 01504 PRINT80 E 01737 A/CALLS E 01505 A/ERROR 01775 FIRST IN SUB : A= 11 B= 16 SECOND IN SUB: A= 7 B= 12 AFTER SUB : X= 5 Y= 7

That's not all, though! Remember, we requested dumping the object code to punch cards? There were 7 cards punched; here is how they look like (note that they have a specific pattern in the first column that does not correspond to any character):

It was possible to use these precompiled "binary" modules as input instead of the source code, saving CPU time. This is why the raw bitmap mode was required.