Should R5 be instead R10? If so, whose foot was R5 pointing to? <g,d,r>
Tom Vacation Notice: None Tom Puddicombe Mainframe Performance & Capacity Planning CSC 31 Brookdale Rd, Meriden, CT 06450 ITIS | (860) 428-3252 | [email protected] | www.csc.com This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. From: Scott Ford <[email protected]> To: [email protected] Date: 04/05/2013 04:58 PM Subject: C and Assembler Sent by: IBM Mainframe Discussion List <[email protected]> Guys: I have an Assembler routine below i want to call in C. I have changed it to be LE conforming. GETSP231 START 0 GETSP231 AMODE 31 GETSP231 RMODE ANY EDCPRLG BASEREG=R12,DSALEN=WORKLEN USING LGINWORK,R13 SAVEAREA AND LOCAL VARS *------------------------------------------------------------- * LOADS STG AMOUNT INTO R9, STG ADDR INTO R10 AND RC IN R11 *------------------------------------------------------------- LM R9,R11,4(R1) LOAD ADDRESS STG AMT, ADR & RC L R9,0(R9) STG AMT - S/B 4K MULTIPLE MODESET KEY=ZERO,MODE=SUP GO INTO SUPERVISOR MODE STORAGE OBTAIN,LENGTH=(9),SP=231,LOC=ANY ST R1,0(R5) RETURN ADDR, IF ANY ST R15,0(R11) RETURN CODE, OK IF ZERO MODESET KEY=NZERO,MODE=PROB BACK TO MORTALITY *------------------------------------------------------------- EDCEPIL LTORG LGINWORK EDCDSAD WORKLEN EQU *-LGINWORK YREGS END GETSP231 In C is did this: /*--------------------------------*/ #include <stdio.h> #include <string.h> #pragma linkage(GETSP231,OS) int rc; unsigned long int fullwd2; char fullwd1[8]; main() { fullwd2 = 102400; rc = GETSP231(&fullwd2,&fullwd1,&rc); printf("Getsp231 rc: %d\n",rc); if (rc == 0 ) { printf("Getsp231 allocation worked\n"); printf("Allocation of: %d\n,",fullwd2); printf("Allocation at: %s\n,",fullwd1); } else { printf("Getsp231 allocation failed\n"); } } I get a RC=0 which is great, but i should get the address passed back to C and I dont see it .. So ...i call upon the great C crystal ball ... As always a big thanks, Scott J Ford Software Engineer http://www.identityforge.com/ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
