From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,76d6ea77e34969a5,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-02-18 11:01:22 PST Path: sparky!uunet!ukma!gatech!swrinde!elroy.jpl.nasa.gov!grog!lungu From: lungu@grog.jpl.nasa.gov (Teodor A. Lungu) Newsgroups: comp.sys.dec Subject: Alpha porting problems. Stack Frame. Date: 18 Feb 1993 19:01:22 GMT Organization: JPL / Caltech Sender: lungu@grog (Teodor A. Lungu) Distribution: world Message-ID: <1m0me2INN8pq@elroy.jpl.nasa.gov> NNTP-Posting-Host: grog.jpl.nasa.gov Trying to port my FORTRAN and MACRO code to Alpha/OPENVMS I ran into some problems. The FORTRAN code wasn't at all difficult to port (minor adjustments), but I could't come up with a solution for porting the following (very short) MACRO code: .TITLE UTL_GET_ARG_ADDR .IDENT /01/ ;++ ;** NAME: UTL_GET_ARG_ADDR ;** ;** PURPOSE: to obtain the address of the argument list of the caller ;** ;** METHOD: The call frame is accessed to obtain the argument address ;** stored within. ;** ;** INVOCATION METHOD: CALL utl_get_arg_addr ( argument_address ) ;** ;** ;** ARGUMENT LIST: ;** NAME TYPE USE PURPOSE ;** ---------------------- ---- --- ---------------------------- ;** argument_address I*4 O the address of the argument list ;** input to the caller ;** ;... ;** ;** PDL: ;*- USE FRAME POINTER TO ACCESS ADDRESS OF ARGUMENT LIST OF CALLER, ;*- AND RETURN IT TO THE CALLER ;-- $SFDEF argument_address = 4 ; .PSECT CODE1 ; .ENTRY utl_get_arg_addr, ^M<> ; MOVL SF$L_SAVE_AP(FP) , @argument_address(AP) RET .END Although there are options to translate Vax macros into Alpha macro, this would not work for the get_arg_addr macro, since the Alpha has a different implementation of the stack frame. I don't know enough about Alpha macro to re-write this function (from scratch, as it were). How is in fact the Alpha stack frame implemented ? Any hints about how to solve the problem? Thanks in advance, -------------------------------------------------------------------------------- Ted Lungu (lungu@grog.jpl.nasa.gov) | Beat the 55mph limit: Jet Propulsion Laboratory | Learn to fly! California Institute of Technology |------------------------------------------ Microwave Atmospheric Science Group |The above opinions are mine, not JPL's 4800 Oak Grove Dr, Pasadena, CA 91109| M/S 183-701 (818)354-4331 | although they should be.