//ASM#CJ   JOB ............................................. <== Verify
/*JOBPARM FETCH
//*
//**                                                                  *
//**           Copyright (c) 1995 - SAS Institute, Inc.               *
//**             Unpublished - All Rights Reserved                    *
//**                                                                  *
//**  Name   : ASM@CJ                                                 *
//**                                                                  *
//**  Purpose: Demonstrate an assembler program calling a statically  *
//**           linked INDEP C function with parameters being passed   *
//**           on the call.                                           *
//**                                                                  *
//**  Function: Compile, assemble, and lked'it source files listed    *
//**            below.                                                *
//**                                                                  *
//**  Source  : See prefix.SAMPLE.ASM members -                       *
//**            ASM@C    - INDEP C function                           *
//**            ASM@CA   - Assembler program calling C function       *
//**                                                                  *
//**  Details: See prefix.SAMPLE.ASM.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.                                                  *
//**                                                                  *
//*
//*
//*********************************************************************
//*  Compile the C function that will be called from assembler.       *
//*                                                                   *
//*  These options are required:                                      *
//*    - INDEP: required to that entry code will be include to        *
//*             establish C execution framework.                      *
//*                                                                   *
//*********************************************************************
//*
//CC           EXEC LC370C,PARM.C='INDEP'
//C.SYSLIN     DD DSN=your.object.library(ASM@CC),           <== Verify
//             DISP=OLD
//C.SYSIN      DD DSN=prefix.SAMPLE.ASM(ASM@CC),             <== Verify
//             DISP=SHR
//*
//*********************************************************************
//* Using HLASM assemble the assembler routine that calls the         *
//* C function.                                                       *
//*                                                                   *
//* Note: Use either H Assembler or HLASM.                            *
//*                                                                   *
//*********************************************************************
//*
//HLSM         EXEC hlasmc,COND=(0,NE),                      <== Verify
//             PARM.ASM='NODECK,OBJECT'
//ASM.SYSIN    DD DSN=prefix.SAMPLE.ASM(ASM@CA),             <== Verify
//             DISP=SHR
//ASM.SYSLIN   DD DSN=your.object.library(ASM@CA),           <== Verify
//             DISP=OLD
//*
//*********************************************************************
//* Link the C function and assembler function together.              *
//*********************************************************************
//*                                                                   *
//* ENTRY=NONE required for the LC370L proc call, this overrides      *
//* MAIN default entry which is provided.                             *
//*                                                                   *
//*********************************************************************
//CC           EXEC LC370L,COND=(0,NE),ENTRY=NONE,
//             PARM.LKED='XREF,LIST'
//LKED.SYSLMOD DD DSN=your.load.library,                     <== Verify
//             DISP=SHR
//LKED.SYSIN   DD *
  INCLUDE INPTOBJ(ASM@CA)          Get ASM main routine
  INCLUDE INPTOBJ(ASM@CC)          Get C indep func
  ENTRY ASMMAIN                    Specify correct Entry Point
  NAME  ASM@C(R)                   Create Usable Module
/*
//LKED.INPTOBJ DD DISP=SHR,DSN=your.object.library
//*
//*********************************************************************
//* Execute the sample program.                                       *
//*********************************************************************
//*
//GO           EXEC PGM=ASM@C,COND=(0,NE)
//STEPLIB      DD DSN=your.load.library,                     <== Verify
//             DISP=SHR
//             DD DSN=prefix.LOAD,                           <== Verify
//             DISP=SHR
//SYSPRINT     DD SYSOUT=*
//SYSTERM      DD SYSOUT=*
//