📄 fcall.gml
字号:
.if '&machine' eq '8086' .do begin
:set symbol="calref" value="cal86".
:set symbol="calttl" value="16-bit Assembly Language Considerations".
.do end
.el .do begin
:set symbol="calref" value="cal386".
:set symbol="calttl" value="32-bit Assembly Language Considerations".
.do end
.*
.chap *refid=&calref. &calttl.
.*
.if &e'&dohelp eq 0 .do begin
.section Introduction
.do end
.*
.el .do begin
. .if '&machine' eq '8086' .do begin
. . .helppref 16-bit:
. .do end
. .el .do begin
. . .helppref 32-bit:
. .do end
.do end
.np
This chapter will deal with the following topics.
.autonote
.note
The memory layout of a program compiled by &cmpname..
.note
The method for passing arguments and returning values.
.note
The two methods for passing floating-point arguments and returning
floating-point values.
.if '&cmpclass' eq 'load-n-go' .do begin
.np
One method is used when :FNAME.&c2cmdup.&exe:eFNAME.,
the version of &product that requires a math coprocessor, is used.
.np
The other method is used when :FNAME.&ccmdup.&exe:eFNAME.,
the version of &product that does not require a math coprocessor, is used.
.do end
.el .do begin
.np
One method is used when one of the &cmpname
.if '&machine' eq '8086' .do begin
"fpi", "fpi87" or "fpi387"
.do end
.if '&machine' eq '80386' .do begin
"fpi", "fpi87" or "fpi287"
.do end
options is specified for the generation of in-line 80x87 instructions.
When the "fpi" option is specified, an 80x87 emulator is included from
a math library if the application includes floating-point operations.
When the
.if '&machine' eq '8086' .do begin
"fpi87" or "fpi387"
.do end
.if '&machine' eq '80386' .do begin
"fpi87" or "fpi287"
.do end
option is used exclusively, the 80x87 emulator will not be included.
.np
The other method is used when the &cmpname "fpc" option is specified.
In this case, the compiler generates calls to floating-point support
routines in the alternate math libraries.
.do end
.endnote
.pc
An understanding of the Intel 80x86 architecture is assumed.
.*
.section Calling Conventions
.*
.np
.ix 'calling conventions'
The following sections describe the method used by &cmpname to pass
arguments.
.np
The FORTRAN 77 language specifically requires that arguments be passed
by reference.
This means that instead of passing the value of an argument, its
address is passed.
This allows a called subprogram to modify the value of the actual
arguments.
The following illustrates the method used to pass arguments.
.pc
.sr c0=&sysin+1
.sr c1=&c0+20
.sr c2=&c1+20
.tb set
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -