Re: ASM call by value

2023-03-26 Thread Frank Swarbrick
re the same as doing the following in C: myfunc(_field) From: IBM Mainframe Discussion List on behalf of Paul Gilmartin <042bfe9c879d-dmarc-requ...@listserv.ua.edu> Sent: Sunday, March 26, 2023 4:19 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: ASM call by val

Re: ASM call by value

2023-03-26 Thread David Spiegel
Hi Tony, IIRC, the pointer to structure (or array), is passed as a value like anything else. Yes,  the value passed allows the programmer to access the structure or array, BUT, it's still a value like anything else (and will not be modified upon return). Regards, David On 2023-03-26 18:33,

Re: ASM call by value

2023-03-26 Thread Steve Smith
Yes. It can be used to pass anything you want. But as always, caller & called must agree on what's passed. sas On Sun, Mar 26, 2023 at 5:35 PM Frank Swarbrick wrote: > Can the MVS CALL macro be used to call a C function with "value" > parameters (rather than reference parameters)? > >

Re: ASM call by value

2023-03-26 Thread Tony Thigpen
No. You will need to create a proper C-style parm list, load it's address into R1, and branch to the C routine address without using the CALL macro. Tony Thigpen Frank Swarbrick wrote on 3/26/23 17:35: Can the MVS CALL macro be used to call a C function with "value" parameters (rather than

Re: ASM call by value

2023-03-26 Thread Tony Thigpen
Structures are passed by address, not value. Tony Thigpen Paul Gilmartin wrote on 3/26/23 18:19: On Sun, 26 Mar 2023 21:35:13 +, Frank Swarbrick wrote: Can the MVS CALL macro be used to call a C function with "value" parameters (rather than reference parameters)? Aren't all parameters

Re: ASM call by value

2023-03-26 Thread Paul Gilmartin
On Sun, 26 Mar 2023 21:35:13 +, Frank Swarbrick wrote: >Can the MVS CALL macro be used to call a C function with "value" parameters >(rather than reference parameters)? > Aren't all parameters in C passed by value? C has no construct of "reference parameters". -- gil

ASM call by value

2023-03-26 Thread Frank Swarbrick
Can the MVS CALL macro be used to call a C function with "value" parameters (rather than reference parameters)? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the

<    1   2   3