DLL Programmer's Guide for TNS/R Systems
Sample Sessions and Usage Notes
DLL Programmer’s Guide for TNS/R Systems—522203-002
6-3
Sample Session One
char *pBegin;
char *pEnd;
char c;
strcpy(r, s);
pBegin = r;
pEnd = r + strlen(r);
while (--pEnd > pBegin )
{
c = *pBegin;
*pBegin++ = *pEnd;
*pEnd = c;
}
return (0);
} /* StrRev */
Compile the Program and Library
The first step is to compile the programs using nmc, the native mode RISC compiler,
on NSK to create the two object files, mainstro and mystro.
$SYSTEM.SYSTEM.NMC /IN mainstrc/mainstro;suppress, OPTIMIZE 0,SYMBOLS,ERRORS
5,EXTENSIONS
TNS/R Native Mode Risc C - T9577D46 - 30APR2003 (Mar 23 2003 19:42:26)
(C)2000 Compaq (C)2003 Hewlett Packard Development Company, L.P.
0 remarks were issued during compilation.
0 warnings were issued during compilation.
0 errors were detected during compilation.
Object file: mainstro
Compiler statistics
phase CPU seconds elapsed time file name
NMC \DLLQA.$SYSTEM.SYSTEM.NMC
CFE 0.3 00:00:02 \DLLQA.$SYSTEM.SYSTEM.CFE
UGEN 0.1 00:00:00 \DLLQA.$SYSTEM.SYSTEM.UGEN
AS1 0.0 00:00:00 \DLLQA.$SYSTEM.SYSTEM.AS1
total 0.4 00:00:02
All processes executed in CPU 03 (NSR-G)
$SYSTEM.SYSTEM.NMC /IN mystrngc/mystro;suppress, OPTIMIZE 0,SYMBOLS,ERRORS
5,EXTENSIONS
TNS/R Native Mode Risc C - T9577D46 - 30APR2003 (Mar 23 2003 19:42:26)
(C)2000 Compaq (C)2003 Hewlett Packard Development Company, L.P.
0 remarks were issued during compilation.
0 warnings were issued during compilation.
0 errors were detected during compilation.
Object file: mystro
Compiler statistics
phase CPU seconds elapsed time file name
NMC \DLLQA.$SYSTEM.SYSTEM.NMC
CFE 0.3 00:00:01 \DLLQA.$SYSTEM.SYSTEM.CFE
UGEN 0.1 00:00:00 \DLLQA.$SYSTEM.SYSTEM.UGEN
AS1 0.0 00:00:00 \DLLQA.$SYSTEM.SYSTEM.AS1
total 0.4 00:00:01
All processes executed in CPU 03 (NSR-G)