//C2ASMJ JOB ............................................. <== Verify /*JOBPARM FETCH //* //** * //** Copyright (c) 1995 - SAS Institute, Inc. * //** Unpublished - All Rights Reserved * //** * //** Name : C2ASM * //** * //** Purpose: Demonstrate how to call a statically linked assembler * //** routine from a SAS/C with parameters passed to the * //** assebler routine and the assembler returning a * //** value. * //** * //** Function: Compile, assemble, and lked'it source files listed * //** below. * //** * //** Source : See prefix.SAMPLE.ASM members - * //** C2ASMA - assembler routine called by C main * //** C2ASMC - C main calling assembler routine * //** * //** Details: See prefix.SAMPLE.ASM(ASM@CA) * //** * //** NOTE: Ensure the statments indicated by '<==Verify' have been * //** customized for your local environment. 'prefix' is the * //** installation defined high level qualifier for the SAS/C * //** product. * //** * //* //********************************************************************* //* Assemble the assembler routine using HLASM. * //* * //* Options NODECK and OBJECT are specified so that the assembler * //* will know where to place the output object deck. * //* * //********************************************************************* //* //C2ASMA EXEC hlasmc, <== Verify // PARM.ASM='NODECK,OBJECT', // MAC1='prefix.MACLIB' <== Verify //ASM.SYSIN DD DSN=prefix.SAMPLE.ASM(C2ASMA), <== Verify // DISP=SHR //ASM.SYSLIN DD DSN=your.object.library(C2ASMA), <== Verify // DISP=OLD //* //********************************************************************* //* Compile the C function and then link it with the * //* assembler routine. * //********************************************************************* //* //C2ASMC EXEC LC370CL,COND=(0,NE), // PARM.C='OMD',PARM.LKED='LIST,MAP' //C.SYSLIN DD DSN=your.object.library(C2ASMC), <== Verify // DISP=SHR //C.SYSIN DD DSN=prefix.SAMPLE.ASM(C2ASMC), <== Verify // DISP=SHR //LKED.SYSLMOD DD DSN=your.load.library, <== Verify // DISP=SHR //LKED.SYSIN DD * INCLUDE INPTOBJ(C2ASMC) Bring in the C Main INCLUDE INPTOBJ(C2ASMA) Bring in the assembler routine ENTRY MAIN Use MAIN as entry point NAME C2ASM(R) Create a usable module //LKED.INPTOBJ DD DISP=SHR,DSN=your.object.library //* //********************************************************************* //* Execute the link module. * //********************************************************************* //* //GO EXEC PGM=C2ASM,COND=(0,NE) //STEPLIB DD DSN=your.load.library, <== Verify // DISP=SHR // DD DSN=prefix.LOAD, <== Verify // DISP=SHR //SYSPRINT DD SYSOUT=A //SYSTERM DD SYSOUT=A /* //