[Info-vax] VMS port to x86
glen herrmannsfeldt
gah at ugcs.caltech.edu
Thu May 31 14:32:10 EDT 2012
Bob Koehler <koehler at eisner.nospam.encompasserve.org> wrote:
(snip, I wrote)
>> To make that work, the linker fixes things up.
> I've seen the linker on TOPS-20 do that. But not on VMS. The
> TOPS-20 calling standard incudes sufficent flags in the high bits
> of the address field to figure it out. I'm not aware of anything
> in the VMS object file that would allow the linker to figure it out.
> Can you generate an example using a VMS Fortran compiler?
The example looks something like:
CALL SUB1('wxyz')
CALL SUB2('wxyz')
STOP
END
SUBROUTINE SUB1(I)
WRITE(6,1) I
1 FORMAT(A4)
RETURN
END
SUBROUTINE SUB2(C)
CHARACTER*4 C
WRITE(6,1) C
1 FORMAT(A4)
RETURN
END
SUB1 needs a %REF, SUB2 needs a %descr.
> I have not seen any compiler that would generate different calling
> conventions depending on whether the CHARACTER data was a variable
> or a constant.
No, it depends on the callee, not the caller.
(snip)
> TOPS-20, as a different example, had only a Fortran 66 compiler for a
> long time and the system did need to be able to mix Fortran 66 and 77
> character conventions.
Maybe it was done there first, and later VAX.
-- glen
More information about the Info-vax
mailing list