Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler Recommendations

 The other day I alluded to a document, normally referred to as a 
"calling standard". This is a document that defines how functions and 
procedures are to be called. As mentioned, most RISC processors use 
registers for some of the parameters. The calling standard is important 
because it defines a standard way that these calls are to be made 
between computer languages. It allows a FORTRAN program to call a C 
function, or a Pascal program to call an ADA routine. One of the more extensive ones I saw was 
the calling standard for VAX/VMS. Every language on the VAX was 
supposed to be compliant. There certainly were other issues, such as C 
accessing a FORTRAN string or array. (Arrays in C are row major where 
FORTRAN is column major). Additionally, some languages pass their 
arguments in different orders. C passes its arguments onto the stack 
last to first such that the called function picks up the first argument 
from the top of the stack(below the return address of course). The 
reason for this is that C and C++ allow for a variable number of 
arguments. (Note that passing via registers simulates a stack). Most 
other languages pass arguments first to last. 

IBM, back in the 360/370 days did not have a calling standard. COBOL 
had its way of calling, FORTRAN had its way, PL/1 was different. The 
only way a COBOL program could call a FORTRAN function would be through 
in assembler interface. Things were real messy. And Burroughs COBOL 
essentially could not call anything because Burroughs did not even have 
a Linkage Editor. 

Jerry Feldman <[hidden email]> 
Boston Linux and Unix 
PGP key id: 537C5846 
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846 
Discuss mailing list 
[hidden email]

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /