;
^1^Щ$Ш§§$0
°Mi" •3f
Шз
Ж
^S
, .,
-ia
_iuuE;Li
surfo /VAT
ЕЮ - 10543
V.P.Shirikov, D.CMarinescu
THE PARAMETER PASSING MECHANISM IMPLEMENTATION IN DIFFERENT FORTRAN COMPILERS
as
^ o v l ^ t ' * ' >•>
ЕЮ - 10543
V.P.Shirikov, D.GMarinescu*
THE PARAMETER PASSING MECHANISM IMPLEMENTATION IN DIFFERENT FORTRAN COMPILERS
*0n leave of absence from the Institute for Atomic Physics, Bucharest, Romania
Шарапов В.П., Маранеску Д.К.
ЕЮ • 10543
Применение к реализация механизма передачи параметров в различных трансляторах с языка ФОРТРАН В работе содержится характеристика типов передачи параметров между различными программными модулями и способа реализации этих типов в различных вариантах трансляторов (в основном, трансляторов с языка ФОРТРАН). Изложение ведется применительно к используемым в настояшее время системам математического обеспечения ЭВМ серии ЕС, ЭВМ фирмы СДС и IBM , ЭВМ БЭСМ-6. Работа выполнена в Лаборатории вычислительной техники и авто матизации ОИЯИ.
Сообщение Объеданеааого аастатута ядерных наследована!- Дубна 1977
! ЕЮ - 10543 Shirikov V.P., Marinescu D.C. ' The Parameter Passing Mechanism Implementation in Different FORTRAN Compilers This report contains some considerations, remarks and comparison for the types and methods of parameter transmissions between different programming modules and also for the methods of implementation for these trans missions in different compilers versions (first of all, FORTRAN compilers). The compilers under consideration are the compilers for the software systems vhich are used now with EC, CDC, IBM and BESM-6 computers. The investigation has been performed at the Laboratory of Computing Techniques and Automation, JINR.
Communication of the Joint Institute for Nuclear Research. Dubca 1977
© 1977 Объединенный институт ядерных исследований Дубна
It is very important for any programmer to recognize ?n which way the parameters are communicated from one module to another for every implementation of the programming languages available. For most programming languages this talk is not so different since the designers of the compilers have no other choice but to implement that particular type of call as stated by people who have designed the language. For example: - in ALGOL the default argument transmission mechanism is by name; it can be changed to transmission by value by specifying the parameter as such in the procedure header. - In PL/1 the default argument transmission mechanism is by reference; it changes to transmission by value when the argument is enclosed in an extra set of paranthesis, in the CALL statement or in the function reference. Also transmission by value arises when the argument is a constant or involves operators. - In COBOL the arguments are transmitted by reference. As far as FORTRAN is concerned several approaches are used: - the strategy announced in CDC manuals' '
is said to be the
call by name with the call by value of expressions appearing as actual parameters; also the call by value is used by internal functions. This approach applies to both FTN and RUN compilers available on CYBER machines. - the IBM approach of the call
used in FORTRAN F , G , H compilers makes use
by value result, parameter passing mechanism, as
default, with the user option to request the call by reference, by enclosing the dummy arguments between slashes. The practical implications of such different points of view are: sometimes the same progra.n compiled by different FORTRAN com-
3
pilers (and even at different optimization levels of the same com piler) gives different results when executed. This might look queer for someone not aware of the fact that for FORTRAN the convention concerning the parameter passing mecha nism is lax and somehow it is left to the compiler designer to decide about the parameter passing mechanism. To illustrate this idea we present in table 1 the results ob tained when the main program and the subroutine from example » 1 were translated by several compilers available around. SUBROUTINE SUB (A.B.C.D)
X = 1.0 Y = 2.0
В = A + A
Z = 7.0
D = A + С
CALL SOB (X ,X,X+Y, Z) PRINT l.X.Y
RETURN
.z
END
1 FORMAT(1H, :3F15.1) STOP
END
EXAMPLE
COMPILER
1.
TYPE OF CALL, ACCORDING TO THE MANUALS
VALUES
OBSERVATIONS
X
Y
Z
FTN
0PT=O
Call by name
2
2
FTN
0PT=1
Call by name
2
2
FFORTRAN
Call by value/ result
2
2
5 4 4
FFORTRAN
Call by reference
2
2
5 4 5
RUN
Call by name
2
2
BESM-6
Call by reference
2
2
TABLE 1.
4
User request OPT=0 User request 0PT=1 Used the default type of call. The user requested call by reference.
Let us briefly examine the four basic types of parameter commu nication
mechanisms and sone details of their practical implemen
tation. - A./
Call by reference
It is eventually the easiest to implement and practically consists of passing the addresses of the actual arguments to the called pro gram. As far as our example
1 is concerned, the expression:
N - X + Y is first evaluated and a stack consisting of the addresses of X,X,Wand Z is constructed (see appendix 1.2 and figure #1) "address of X
address Q
address of X address of W address of Z
FIGURE #1. The call by reference implementation in FORTRAN F compiler.
The calling program loads in general purpose register Rl the address of a memory location Q where a pointer to the stack is to be found. It is the responsibility of the linkage editor to fill Q with the stack address. When entered the subroutine copies the stack and throughout the computation operates with the locations in the main storage for X,X,W and Z, as defined by the calling program. In this situation
, side effects can occur; one of the most
unpleasant ones occures when a constant is passed as an actual argument and the called module attempts to modify the dummy argu ment to which the constant is associated. In case of example
«2
presented below, most FORTRAN compilers hould lead to the result J-ll.
5
N - 8
SUBROUTINE S (I.J.K) К - К + J
M * 6
I « I + 2
J ' 8
RETURN
CALL S (l.M.N)
END
J = J + 1 PRINT 1,J 1
FORMAT (1H , IS) STOP END
EXAMPLE #2. Sometimes to protect against unpleasant surprises, FORTRAN manuals
/ 3 /
warn that "input parameters must not be changed inside
the called module" (must not appear as the left-hand side of an assignation statement). Another type of side effect is due to the fact that the call by reference is associated with the call by value of expressions appearing as actual parameters, as in the case of example #1; there, the expression is first evaluated using the old value for X. This type of side
effect does not occur if the rule of not modifying
the input parameters is observed and if every variable appearing in the expression is considered as an input parameter. - В./
Call by value
Instead of passing the parameter addresses , in this case their values are communicated in a stack. If the machine has enough registers the values of the parame ters can be passed into the registers, thus saving time. It should be noticed that there is no feedback from the called module to the calling one so that, though this strategy is most suitable for input parameter passing, it leaves no hope for output parameter communication. This is precisely the reason why this type of call has a limited use. As stated before the FTN compiler uses this type of call for internal functions since only input parameters are to be passed, their number is limited and anyway
6
the result is returned as a variable with the same name as the function name. - C/
Call by value/result
As in the previous case the values of the actual parameters are passed but also a pointer to a stack of parameter addresses is communicated. As a result, the called module opperates with the values passed, but before returning to the calling module the values of actual arguments are updated. If we examine appendix 1.2 we see that when the subroutine SUB is entered, the general purpose register Rl contains the address Q, where a pointer to the stack of addresses is inserted by the linkage editor; a copy
of parameter values is made (the sequence
of instructions starting at label A20). Then the computation suggested by statements 2 and 3 of the subroutine is performed (the sequence of instructions starting at label A52). Before returning, Rl is loaded with the address of a memory loca tion, where a pointer to the stack of parameter addresses is to be found
(the sequence of two instructions starting at label A36),
then all four parameters X,X,W,Z get their values updated (the four pairs of instructions, load and move constant). It results that in addition to the side effects previously encountered, in connection with the call by reference, here occures an additional one; the computations performed by the called module are using the initial values of the input parameters. - D./
Call by name
The call by name seems to be the most natural to communicate para meters since it is ment to implement the textural substitution and thus no side effects can possibly occur. In case of our example #1, A is substituted by X, В by X, С by X+Y, D by Z and the executable statements of the subroutine are: X = X+X ; /X = 1+1 = 2/ Z * X+(X+Y);/Z = 2 + 2 + 2 = 6/. Obviously since the names of variables have a significance only within a module some sophisticated mechanism must be available so that when a reference is made to X in the called module, its address should be supplied. It means that at run-time, a routine must be entered every time a parameter is referred to, to supply
7
its address. This leads to considerable inefficiency and it
is
rather difficult to construct. As far as the FTN compiler is concerned the type of call is by no means a call by name. Appendix 2.1 proves this statement when optimization level one is requested. Examining the COMPASS expan sion we see that: - registers XS,X4,X3,X2 are loaded with the addresses of X,X,K and Z using the pointer to the stack, provided in A0. - the initial value of X
(value 1 ) , is loaded into XI.
- the new value for X (value 2) is computed in X7 and the memory location reserved for X is updated. - when Z is computed, the old value of X, existing in XI, is used so that the result 4=1+3 is obtained. In appendix 2.2 we see that when optimization level zero is request ed, the same procedure is followed, but for X it is used the value in memory address and not the one in register; so that the result 5=2+3 is obtained. A summary of values to be expected for the program in example #1 for the four possible types of parameter passing mechanisms is presented in table 2.
VALUES/EXAMPLE 1
TYPE OF CALL
X
Y
Z
Call by reference
2.0
2.0
5.0
Call by value
1.0
2.0
7.0
Call by value/ result Call by name
2.0
2.0
4.0
2.0
2.0
6.0
TABLE
2
CONCLUDING REMARKS -1. The call by name is by far the best method of parameter passing since it jives no side effects; it is the most diffi-
•
cult to implenent and eventually leads to inefficiency as far as execution tine is concerned. It has not been encountered in any of the compilers under scrutinity. -2. As far as the unprejudiced programmer is concerned he must not take for granted whatever manuals state, but h« must try to understand what lies behind each type of call and he must be able to test the compiler he is using.
References 1. 2. 3. 4.
FORTRAN Extended Reference Manual. CDC publication #60329100. FORTRAN Reference Manual. CDC publication #60174900. FORTRAN Reference Manual. IBM publication. G.J.Myers. IBM Systems Journal, vol. 15, #3, 1976.
Received by Publishing Department on March 30, 1977.
t
APPENDIX
1.
Tests made with the FORTRAN F compiler.
FORTRAN main program and its ASSEMBLER expansion. The subroutine SUB in FORTRAN and its ASSEMBLER expansion 1. Khen call by value result
is used (APPENDIX 1.1)
2. When call by reference is used DOS FUSTPAN TV 7.6&NF0-474 3-Я COM!
0002 C093 003* f::i05 0006 0007 01.38 DUS FORTRAN LOCATION СЭООО0 0J03U2 O0JOP6
0'"'J0CA O-OOOT 001012 0-!J0)4 U'IJO:? OO.JOIC
cm?) Li j 02',
Of 0 0 2 3 0JJ10R
ojoioc
0001?D 000114 000118 00011 A OJOUP
0JO120 000122 000126 ОЭ012В 00012C 050130 000134 000138 00013C 000140 0J0144
000148 00014C 000150 000154 000156 00015A 00015E 000160 000164 00016Я 0J016C 000170 000174 0 10178 00017C 000180 000184 СЭ0188 0 0 0 1 ВС 000190 000194 00019Я TOTAL
2
-
7
I V 3 6 C N - F 0 -• 4 7 9 3 8 STA N U "
DATE
X=l. 0 Y=2, . 0 ? j .. 0 CALL SUB(X , X , X + Y , Z ) WRITE!?,1) X.Y.Z FORMATdH , 3 F 9 1 ) STOP END =
?
(APPENDIX 1.2) MAJNPGM
1
1
MAINPGM
LABEL
OP BALR LM L LA ST BCR Ai DC ОС ОС DC DC DC AT? L L LM KIVI BCR A36 L LR LR BAL LR 1 • LE STE 2 LE STE 3 LE STE 4 LE ДЕ STE LA L BALR ВС 5 L BCR BAL DC DC L BAL DC BAL ОС 8AL DC BAL 7 L BAL DC DC END MF."flRY RFQUIRCMENTS 0 0 0 1 9 A BYTES
10
OPERAND 15,0 2,3,34(15) 13,30(0,151 15,2(0,15) 15,4(0,13) 15.2 00000000 07П4С1С9 O )07C7D4 OJOOOOOO r
оэоооооо
OOOOOOOO 12,'(0,131 14,12(0.131 •', 1 2 , 2 3 ( 1 3 ) 12(131,255 15,14 15,11210,13) 12,13 13,4 14,64(0,151 13,12 0,20410.131 0,96(0,13) 0,20810,13) 0,10010,13) 0,21210,13) 0 . 1 0 4 (0 ,13 ) 0,96(0,13) 0.100(0.13) 0.216(0.13) 1,116(0,13) 15,108(0,13) 14,15 0,410,0) 15,112(0,13) 0,0 14,4(0,15) !, 0 0 0 0 0 0 3 OOOOOOBO 15,112(0,13) 14,8(0,15) 0470D060 14,8(0,151 0470D064 04f0D0£6 14,16(0.15) 15,112(6,13) 14,52(0,151 05404040 4040
OATE
27
APPENDIX 1.1. The subroutine SUB in FORTRAN and its ASSEMBLER expansion produced by the FORTRAN F compiler, when standard (call by value/result) parameter passing is requested. 0001 00J2 0303 0004 GC05 OPS F O T F A N
SYWfJJL В
IV
360N- F C - 4 7 9
LOCATION 90
DOS FORTRAN LOCATION OJOOOO G00004 000003 0 0 0 J 0Г OuOOlO 0СЭ014 000016 00J01A G0JO1E ОС Э022 ОС0024 CP0023 СЛУ02С
IV
A36
coone
2 3 • 4
A 52
SUB
SCALAR УАР LOCATION 94
3 8
LABEL
Л20
OC'OOEZ О0ЭОЕ6 OOOOEC COOOFO CK.'00F6 0P00FA 000100 00'J 102 000106 000109 OiOlOC 000110 000114
3- P
SYMUflL A
36C*1- F C - 4 7 9
STA N i l *
oooona C'OJODC
O'JOllE ОГ.^122 000128 00012C 000172 000136 01J013C 000140 000144 00014B 00014C 00014E О0Э152 000156 00015A 00Э15Е 000162 000166 000168 00016C
SUB (A-.> B , C , D I
SUBROUTINF B = A*A 0=A+C RETURN f-NO
PATE
SYVROL 0
SUB OP ВС DC DC ST4 LM LR L ST ST4 BCR DC DC DC L MVC L MVC L MVC' L MVC B4LR L BCR DC L L L MVC L MVC L MVC L MVC L L LM MVI BCR LE ДЕ STE LE AE STE SR L BCR
-
END TOTAL MEMORY REQUIREMENTS 00O16E BYTES
DUE
OPERAND 15,12(0,15) 07E2E4C2 40404040 14,12,12(13» 2,3.40(15» 4,13 13,»6(0,15) 13,8(0,4) 3.4,0(13) 15,2 00000000
oooooooo 00000000
2,0(0.1) 100(3,13).0(21 2,4(0,1) 96(3,131,0(2) 2,8(0,1) 108(3,13).0(2) 2,12(0,1) 104(3,131,0(2) 2,0 3,6(0,21 15,3 OOOOOOOO 1.4(0,13) 1.24(0,1) 2,010,11 0(3.21,100(13» 2.4(0,1) 0(3,2),96(13) 2,8(0,1) 0(3.2),108(13) 2,12(0,1) 1(3,2),104(13) 13,4(0,13) 14,12(0.13) 2,12,28(13) 12(131,255 15,14 0.100(0,13) 0,100(0.13) 0.96(0,131 0,100(0,13) 0,108(0,13) 0,104(0,131 15,15 1.0(0,13) 15,1
The results obtained in this case: X - 2.0 Y - 2.0 Z - 4.0 Indeed a call by value results is used.
11
L'XATI 93
APPENDIX 1.2. The subroutine SUB and its ASSEMBLER expansion when call by reference is requested by the user. SUBSOUTINF SUB(/A/,/B/,/C/,/D/l B«A+A D=A*C RETURN END
COO! COO 2 0JJ3 0004 005
DPS FD3TP/W IV ?60N- FO 47P 3 8 SYMBOL В
LfCATION 90
DOS РПЗТРЛЧ LOCATION CJOJOD C.JJ304 IOJ004 OOOJOC
IV
STA
SYMBOL A
SCALAR HAP LOCATION 94
№,
LABEL
0?чЭ?4 00001A
ajozt
OJ0104
CO 11 08 иЭЛОА 01JIOE GJOIIO
000114 OOOiie 00>11C 0ЭО12О С J0124 000128 OvJOlJC 0'J'jl2E 0J0132 000)36 0Э013А 00013E 000142 00J146 00Э14А C0014E 000152 C00156 000158
0001 5C TOTAL
DATE SYMBOL D
?61N FT 4 7 9 ? я
0 *o 31 >
0103?4 COC023 0).JO?C О0ООП9 oijonr. O^JOEO C!uOE4 ОЛООЕР O-'iOOEC COI'JFO oo;ior4 0OJJF9 UOuDFC o'OlOO
SUB
PATE
OP ВС DC ОС ST4 L4 LR L ST ST4 BCR
nc DC DC A20 L LA ST L LA ST L LA ST LA . ST BALC L BCR DC A36 L L L L LM MVI BCR 2 A52 L LE AE L STF 3 LE L AE L STE 4 SR L BCR END "EMORY RFOUIREMENTS 00015E BYTES
OPEFAND 1?,12(0,15) Э7Е2Е4С2 404C4040 14,12.12(13! 2,3,40(15) 4,13 13,36(0,15) 13,8(0,4) 3,4,0(13) 1?,2 00000000
oooooooo
00000000 2,0(0,1) 2,0(2,0) 2,100(0,131 2,4(0,1) 2,0(2,0) 2,96(0,13) 2.8(0,1) 2,0(2|o) 2,108(0,13) 2,12(0,1) 2,0(2,0) 2,104(0,13) 2,0 3,6(0,2) 00000000 1,4(0,13) 1,24(0,1) 13,4(0,131 ).*,12(0,131 2,12,28(131 11(131,255 15,14 10,100(0,13) 0,0(0,10) 0,0(0,10) 11,9610,13) 0,0(0,11) Jj0(0,10) 12,508(0,13) 0,0(0,12) 10,104(0,13) 0,0(0,10) 15,15 1,0(0,13) 15,1
The results obtained in this case: X - 2.0
Y - 2.0
L ОС A T I :
Z • 5.0
They indicate that it is really a call by reference.
12
APPENDIX
2.
Tests with the FORTRAN Extended - FTN compiler.
Appendix 2.1. Main program and subroutine COMPASS expansion when OPT-1. Appendix 2.2. The same but for the case OPT» 0 AM STA<>T
OO'ili,'» 1>0I»1<»<* О0ЦИ-5 D0<*1<*6 UOitVt I
73/7*
0T-T=1
FTN '..6*1.23
PI.0Gf.A4 START (INPUT, OUTPUT) >; = i.C Y = 2.T Z = 7.0 CALL S U D < ; : , X , X * Y , Z > PRINT i , x , r , z FOP.MATtiH , 3 F l S . i l STOP П10 DATA. 17го*»ооососарооьосо11 DtTA. i7aiitorc:coctooti.i!oc DATA. 17227Du»2C8ur95Clsl-0l> DATA. DATA.
COM. B3S I B DATA 172i)<*0UPO О О П (1V U !i IIV Р О Э ПАТА 17г11»ооэа DA1A 17227&'J0Q C D O l C U n i J D C О Й Т Д о э о о с .< о п -ОjС О Г О О С О О О О З STOP. EXT tXT ouTCi. tXT sun QBNTRY I XT 3SS I B X Y "SSS IB Z 3SS IB WS£ CODE. 3
C0L15B DATA. O C t l f l DATA. 001.152 DATA.
00Ц113 GODt. 001*111» CODE. 001*115 CODE.
001.116 CODE. 001(117, CODE. 001*120 CODE. 00i«121 CODE. 001*122 CODE. 00<*123 CODE. 001.121.. CODE. 0C<*125 001*125 001.126 001*127 00«*130 001*131 00i»13Z
CODE. CODE. CODE. COOE. CODE. CODE. CODE.
•511 аол1*1ч1, Я 1 > 0 0 ( | 1.И.5 5130О?1>1Ч6 Е110Р0И25 10 755 5U 0.5 10Ы*1* • 517000'*150 2'*7lU. 51Р»000^1Ы 11-633 5170001*132 51E00CWF2 PlOOOtHUOt C0L'50Ci*lll 5110001.133 eioosstciic 1 ОСЬОС u i l 1 Si:00U41t*7 CKOOOUOOtC
DATA. tlATA» DATA. CODE.
UO0DDaOl132 O9O0OOC00000C0D0U52 OOOOOClOOOOOOOOCUOCO
DATA. DATA. COOE. DATA.
;
DATA. ОАТЛ. CODC. DATA. DATA.
* •
*•
DATA. tAPl
l
ST.
z.
13
SA5 Ufti. SA3 SA1 BX7 FXli BX6 SA7 NX 7 SAC « b SA7 SAb P.JT
CON. CON,*1B CON.*23 tAPl Xp X':-*X5 Xi» X 45,XO Y X? ST.
SA1 P.JT
3101 0UT(-I.,6D
SA1 EQ i?SS A PL APL A PL APL APL BSS ENO
C0N.+3B STOP. OG X X ST.
zSilO.5-4
z IB STAP.T
APPENDIX 2.1.
The subroutine SUB in FORTRAN and its COMPASS expansion when the user requested optimization level one /OPT-1/ to the FTN.
IT] HE SU8
73/7%
l)t'T=l
'•
' FTN ».6»Уг
6
tMBKOUTINE SUO(A,R,C,D> B = A*A RtTUKtJ
tun COiiU'ASS cotte as generated by the PX'a compiler USE USE оооось S T A R T . COOOC'l START. OUUIOZ S T S M . 0 0 0 0 1 3 STftRT. 00000*1 START.
ПАТА. START, TRACE S U B , SUS,I>B
2 3 2 5 0 2 ! bSSS-SSPJl-t'CCS ii0f0ruH-50PCi!80l-0t[.r 313?DM O01!2l'3PO0C00 J'*(Jil0C'0D3flGOnitsOOO 71,1,0О5<*О1Г.5160СО[ЧГ1
TEHTR.r
SUB, FNTRV.,0,0
A FOKPAR F Oh. PAR U FORPAR С FOkPAR 0 USE D A T A . . U'JE D A T A .
000DC 5
СООГ.
OOttCb
CODE,
H030GHD31
000007
ClJDE.
63150
5(Лоооооог
SA5
АО A0*2B АОНВ' A0 + 3B X5 \ XltXl XI» X3 XS + X l D0,XO
SA<»
51'711 IS7SI.
33CS1
гчоос 000011 U'lPE.
CODE.
SA3 SA2 SA1 FX7 SA5 SA7 FXO NX6 SA6
r-f 2OJUl'0t-3
0PM10 СОПС
USE
?3G2t
La
ЛАКТ.
.iiiGOOOOUCZ
END
The results obtained in this case (they indicate a call by value/result parameter passing mechanism): X = 2.0
Y = 2.0
The FORTRAN Extended
Z = 4.0
Reference manual''"
states that
the call by name constitutes the standard parameter passing mechanism, associated with a call by value for expressions appearing as actual parameters. Differences between different optimization levels in this respect are not mentioned.
14
хг EXIT,
APPENDIX 2 , 2 . T h e subroutine SUB in FORTRAN and its C O M P A S S expansion when the user requested optimization level zero / O P T - 0 / .
SUB
73/7> blJiftOUTInr :=A*A B=A+C \LTUKN I HD
OPT=n ТРАСЕ
FTN
SUH(A,9,CiD>
C O M P A S S code as generated by the FTN compiler
000000 STAP.T. 000001 000012 000003 00000 4 0000!. S
START. START. STAKT. START. STAP.T,
0 0 0 0 0 6 CODE.
USE OATA. USr START. TRAGC SU3iSUU,t3
2 3 2 5 t 2 ' 5Е555550'Ш1!1| 00000000000000000300 51300vCOOi!'2ti3JC&Dl!r 611277/7Ь36112ЭйЫ.0С CtOCiniC3i»61600ii6tSO 7<1')ОС5ЧГ10Е.1600 0 00 01
PEHTRV
6102С0ЮС2 iiWOO ЬЗЧЕС
0 0 0 0 0 ? CUflE.
ЗО'/^Ц ЗСЗйСООРО! 53730
000010 C O J E .
6102000003 54500
'•3!|5C 000011 C O D E . 000012 CODE.
5030000002
вэгоомосз
S3E30 3(.£"3't
2'woc 000013 C O D E .
Г3720
6102000091» оцсоогооиг S T A R T .
SU-3, ENTRY. S , l f
FO>;PAR A F04PAR О КОР PAR С ГОР.РАР 0 USt ПА.ТА.. USE DATA. USE
CODE.
S80 SA5 SA
92*23 АО X5 XI, »X<. АПН В X3
SRO SA5 SA
32*3 В A!. К
SBU EQ TNt)
The results obtained in this case (they indicate a call by reference, parameter passing mechanism): X - 2.0
1 '
Y - 2.0
IS
5.0
'.с+гв ло+зв
хз X5*Y4
ви.хо Х2 B2*tB EXIT.
л: l
i
•ГТ-I
?/»••
I r.QGf;Ar L V * T X= 1.l
FTtl
Tii.*OE
(IMPUTtOUTPUT)
7 = 7.1 CALL 3 U i C X , X X * Y Z > HI.INT 1 , X , Y , Z r O ' - K f T l l H , 3F15. I I bTJP • НЭ 0 G M S 1 DATA. 0 0 4 1 5 1 ЦАТА. «гоадсизисмооиоос 0 П 4 1 5 2 LATA. 17214НГ-0С06Г00ШСГ « C b J 5 3 DATA. 17г27.чСл[1СиПВП:[[С 00415
t
сом. iss и а DATA PATA t?ATA TATA LXT EXT ГХТ EXT X Y Z
сишьь DATA. С IK IE 6 Ь Л ) А . 001.15 7 ПАТА.
Р 0 ч 1 К С'ЛЕ.
ь1иггиспог 51Ь00Г41Ы
00<»115 COi)F.
10755
0 0411b
l-tl-2l--jl-t-ti 3
Cnrjf.
51700Г4155
DATA.
DAT*.
10755 517С0С415Ь
осшгс coot:.
f . n г п ш 0Э4
0G4121 COOC.
10 755
DATA. 4-
f 150001.153 DATA. 317'.'ССЧ1Г7
с о ч г г СОЭЕ. 0 0 ^ 1 2 3 COOF. 004124 CODE.
С0412Е СОЭЕ.
DATA.
+
Ы(20010и5 Я 5 0 0 Р 4 1 Е 5 DATA. 5140C">43 5 6 DATA. M 1 0 0 U 4 1 3 ? CODE. 30045 2'; 7 ОС Я 7 0 С Г 4 1 3 7 CODE, UICOOOIOUD (Ь050С'41П
осмгь CODE.
б ю г т с с б
0 0 " . 1 Z 7 CODE.
010000GUOO
EllOOPbJIif
DATA.
OCCbOOMll
1720411000000000000003 172140000000000000003 17?27'i0u00flC0C0l0!10l3 U3t00'''OLOOO.C0rOPQ0OO3 STOP. OUTCI.•
<
su3
FTNRPV. BSS 1 0 4SS I B 3SS 1 8 USE CODE.
вг*гв
SBO SA5 BX7 SA7
DATA.
• Г.150РГ4152
0 0 4 1 1 7 CODE,
»-.''«4гв
•
COM. X5 • X
SOO SA5 BX7 SA7
вг*зв сон. и з
SBO SA5 BX7 SA7
вг»1 в
SBG SA5 SAIt SA1 FXO ЧХ7 SA7 RJT
X5
r CONt«2B X5
z •
чг*Ев X Y С API Xt»X5 BO.XO ST. SUP,SB
« +
вг»ьв
SBO SA1 RJT
1101 OUTCI.,Ь
sei>
вгисз
SA1 EQ BSS APL APL APL APL APL BSS END
СОИ.+33 STOP. OB X X ST.
9
0 04130 (.CUE.
bU2l!4'0H>
001(131 004132 004132 001*133 0Ct»13«t 00*135 404136 001(137
U4t'OtiOL00O
CODE. CODE. CODE.
coat. СОЭГ.
coor. CODE. CODE.
M10bt>lil54
DATA.
ОЛ)0ШиСС1'йС0014155 OOtOOOf ГОЬ('ОГ000415Е U0T0tr,OUO0(;00O0C4t37 0OOOOOMOOCO6OOO4I57 DOlOOntOOOCOCOOtDDOO
DATA. DATA. CODE. DATA.
(API
ST.
z•
z IB START
v..
i
i
Издательский отдел Объединенного института ядерных исследований. Заказ 231 OS. Тяраж 4 7 5 . Уч.-изд. листов 0 , 7 2 . Редактор Э.В.Ивашкевич. Подписано к печати 13.5.77 г . Корректор Т.Е.Жильцова