I think this is exactly what I am looking for. Thank you. ________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Steve Smith <sasd...@gmail.com> Sent: Sunday, March 26, 2023 5:35 PM To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU> Subject: Re: ASM call by value
I forgot to mention, to pass by value with CALL, you need [a] register[s]. e.g.: void foo(int i, int j , &int k) { k = i + j; } * ASM L R2,xyz LHI R3,1 CALL FOO,((R2),(R3),BAR) ... XYZ DS F BAR DS F Depending on # of registers available vs. # of value parms, CALL may become infeasible. sas On Sun, Mar 26, 2023 at 6:36 PM Tony Thigpen <t...@vse2pdf.com> wrote: > 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 reference parameters)? > > > > > > ---------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN