The joy of VAX C

Liste des GroupesRevenir à col misc 
Sujet : The joy of VAX C
De : lars (at) *nospam* beagle-ears.com (Lars Poulsen)
Groupes : comp.os.linux.misc alt.folklore.computers
Date : 28. Sep 2024, 20:27:59
Autres entêtes
Organisation : AfarCommunications Inc
Message-ID : <vd9lc0$1ceg1$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Mozilla Thunderbird
On 26/09/2024 18:01, Lars Poulsen wrote:
On 26/09/2024 13:43, Lawrence D'Oliveiro wrote:
On Thu, 26 Sep 2024 11:49:37 +0100, Pancho wrote:
>
On 9/26/24 11:10, Lawrence D'Oliveiro wrote:
>
On Thu, 26 Sep 2024 08:42:32 +0100, Pancho wrote:
>
... a bitch to work out how to call Vax C from Vax Pascal, or vice
versa.
>
Why would it be that hard? VAX C passed everything by value, while
Pascal let you specify descriptors, references, immediate value ... all
the options.
>
There ware decisions to be made, like what order do you push variables
onto the stack, when do you push the return address, how to interpret a
Pascal String in C.
>
All these things were standardized in the VAX/VMS ABI, right from the
beginning.
 IIRC, VAX C did not completely follow the standard calling conventions, which created some issues in mixed-language applications.
In retrospect, I think the problems in mixing C with other languages came down to this:
For a C routine to be callable from another language, I suspect that the C routine would have to declare each and every argument as a descriptor structure, the use the descriptor to find the data.
And for a C routine to call a subroutine in another language, it would have to build a descriptor structure for that argument.
More trouble than anyone would want if they were used to C on any other platform. Was that the right or the wrong choice?
An extension with a keyword like "descriptor" attached to a procedure prototype could have made that much easier to work with!

Date Sujet#  Auteur
6 Jul 25 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal