📄 cplibr.gml
字号:
.exam end
Note that the
.fi WDEBUG.386
file which is installed by the &company Installation software contains
the emulation support found in the
.fi WEMU387.386
file.
.do end
.np
.ix 'options' 'fpi87'
When the "fpi87" option is used exclusively, the emulator is not
included.
In this case, the application must be run on personal computer systems
equipped with the numeric data processor.
.*
.section &product Alternate Math Libraries
.*
.np
.ix 'libraries' 'alternate math'
.ix 'options' 'fpc'
One of the following Math libraries must be used if any of the modules
of your application were compiled with the &product "fpc" option and
your application requires floating-point support for the reasons given
above.
The following Math libraries include support for floating-point which
is done out-of-line through run-time calls.
.* WCC ---------------------------------------------------------
.np
.us 16-bit libraries:
.if '&target' eq 'QNX' .do begin
.ix 'maths.lib'
.ix 'mathm.lib'
.ix 'mathc.lib'
.ix 'mathl.lib'
.ix 'mathh.lib'
.millust begin
maths.lib (small model)
mathm.lib (medium model)
mathc.lib (compact model)
mathl.lib (large model)
mathh.lib (huge model)
.millust end
.do end
.el .do begin
.ix 'MATHS.LIB'
.ix 'MATHM.LIB'
.ix 'MATHC.LIB'
.ix 'MATHL.LIB'
.ix 'MATHH.LIB'
.millust begin
MATHS.LIB (small model)
MATHM.LIB (medium model)
MATHC.LIB (compact model)
MATHL.LIB (large model)
MATHH.LIB (huge model)
WIN&pc.MATHC.LIB (Windows dependent)
WIN&pc.MATHL.LIB (Windows dependent)
.millust end
.do end
.* WCC386 ------------------------------------------------------
.np
.us 32-bit libraries:
.ix 'C libraries' 'flat'
.ix 'flat model' 'libraries'
.ix 'C libraries' 'small'
.ix 'small model' 'libraries'
.if '&target' eq 'QNX' .do begin
.ix 'math3r.lib'
.ix 'math3s.lib'
.millust begin
math3r.lib (flat/small models, "3r", "4r" or "5r" option)
math3s.lib (flat/small models, "3s", "4s" os "5s" option)
.millust end
.do end
.el .do begin
.ix 'MATH3R.LIB'
.ix 'MATH3S.LIB'
.millust begin
MATH3R.LIB (flat/small models, "3r", "4r" or "5r" option)
MATH3S.LIB (flat/small models, "3s", "4s" or "5s" option)
.millust end
.do end
.* ------------------------------------------------------
.np
.ix 'numeric data processor'
.ix 'math coprocessor'
Applications which are linked with one of these libraries do not
require a numeric data processor for floating-point operations.
If one is present in the system, it will be used; otherwise
floating-point operations are simulated in software.
.if '&target' ne 'QNX' .do begin
The numeric data processor will not be used if the environment
variable
.ev NO87
has been set (this variable is described below).
.do end
.*
.if '&target' ne 'QNX' .do begin
.*
.section *refid=libno87 The NO87 Environment Variable
.*
.np
If you have a numeric data processor (math coprocessor) in your system
but you wish to test a version of your application that will use
floating-point emulation ("fpi" option) or simulation ("fpc" option),
you can define the
.ev NO87
environment variable.
.ix 'options' 'fpc'
.ix 'options' 'fpi'
.np
(16-bit only)
.ix 'emu87.lib'
The application must be compiled using the "fpc" (floating-point
calls) option and linked with the appropriate
.fi math?.lib
library or the "fpi" option (default) and linked with the appropriate
.fi math87?.lib
and
.fi emu87.lib
libraries.
.np
(32-bit only)
The application must be compiled using the "fpc" (floating-point
calls) option and linked with the appropriate
.fi math3?.lib
library or the "fpi" option (default) and linked with the appropriate
.fi math387?.lib
library.
.np
.ix '&setcmdup' 'NO87 environment variable'
Using the "&setcmdup" command, define the environment variable
as follows:
.millust begin
&prompt.&setcmdup NO87=1
.millust end
.pc
Now, when you run your application, the 80x87 will be ignored.
To undefine the environment variable, enter the command:
.millust begin
&prompt.&setcmdup NO87=
.millust end
.do end
.*
.section *refid=cplibrt The &product Run-time Initialization Routines
.*
.np
.ix 'run-time initialization'
Source files are included in the package for the &product application
startup (or initialization) sequence.
.* WCC ---------------------------------------------------------
.np
(16-bit only)
.if '&target' eq 'QNX' .do begin
These files are located in the directory:
.millust begin
/usr/lib/src/startup (QNX initialization)
.millust end
.np
The following is a summary list of the startup files for QNX.
.ix 'cstart_s.asm'
.ix 'cstart_m.asm'
.ix 'cstart_c.asm'
.ix 'cstart_l.asm'
.ix 'cstart_h.asm'
.ix 'cstart.asm'
.ix 'models.inc'
.ix 'cmain.c'
.ix 'mdef.inc'
.millust begin
cstart_s.asm (startup for small memory model)
cstart_m.asm (startup for medium memory model)
cstart_c.asm (startup for compact memory model)
cstart_l.asm (startup for large memory model)
cstart_h.asm (startup for huge memory model)
models.inc (included by cstart_*.asm)
cstart.asm (included by cstart_*.asm)
mdef.inc (macros included by cstart.asm)
cmain.c (final part of initialization sequence)
.millust end
.pc
.ix 'cstart.asm'
.ix 'cmain.c'
The assembler file
.fi cstart.asm
contains the first part of the initialization code and the remainder
is continued in the file
.fi cmain.c.
.ix 'cstart_*.asm'
The assembler files,
.fi cstart_*.asm
.ct , define the type of memory model and include
.fi cstart.asm.
It is
.fi cmain.c
that calls your mainline routine
.id (main).
.do end
.el .do begin
.ix 'DOS' 'initialization'
.ix 'DOS/16M' 'initialization'
.ix 'Windows' 'initialization'
.ix 'OS/2' 'initialization'
.ix 'initialization' 'DOS'
.ix 'initialization' 'DOS/16M'
.ix 'initialization' 'Windows'
.ix 'initialization' 'OS/2'
The initialization code directories/files are listed below:
.np
.ix 'WILDARGV.C'
.ix '8087CW.C'
.cp 8
.us Under
.fi &pathnamup&pc.SRC&pc.STARTUP
.millust begin
WILDARGV.C (wild card processing for argv)
8087CW.C (value loaded into 80x87 control word)
.millust end
.np
.ix 'CSTRT086.ASM'
.ix 'DOS16M.ASM'
.ix 'CMAIN086.C'
.ix 'MDEF.INC'
.cp 15
.us Under
.fi &pathnamup&pc.SRC&pc.STARTUP&pc.DOS
(DOS initialization)
.millust begin
CSTRT086.ASM (startup for 16-bit apps)
DOS16M.ASM (startup code for Tenberry Software's DOS/16M)
CMAIN086.C (final part of initialization sequence)
MDEF.INC (macros included by assembly code)
.millust end
.keep
.np
.ix 'CSTRTW16.ASM'
.ix 'LIBENTRY.ASM'
.ix 'MDEF.INC'
.us Under
.fi &pathnamup&pc.SRC&pc.STARTUP&pc.WIN
(Windows initialization)
.millust begin
CSTRTW16.ASM (startup for 16-bit Windows apps)
LIBENTRY.ASM (startup for 16-bit Windows DLLs)
MDEF.INC (macros included by assembly code)
.millust end
.np
.ix 'CMAIN086.C'
.ix 'MAINO16.C'
.ix 'CSTRTO16.ASM'
.ix 'EXITWMSG.H'
.ix 'WOS2.H'
.ix 'INITFINI.H'
.ix 'MDEF.INC'
.cp 13
.us Under
.fi &pathnamup&pc.SRC&pc.STARTUP&pc.OS2
(OS/2 initialization)
.millust begin
CMAIN086.C (final part of initialization sequence)
MAINO16.C (middle part of initialization sequence)
CSTRTO16.ASM (startup for 16-bit OS/2)
EXITWMSG.H (header file required by MAINO16.C)
WOS2.H (header file required by MAINO16.C)
INITFINI.H (header file required by MAINO16.C)
MDEF.INC (macros included by assembly code)
.millust end
.np
The following is a summary description of the startup files for DOS.
The startup files for Windows and OS/2 are similar.
.ix 'CSTRT086.ASM'
.ix 'CMAIN086.C'
The assembler file
.fi CSTRT086.ASM
contains the first part of the initialization code and the remainder
is continued in the file
.fi CMAIN086.C.
It is
.fi CMAIN086.C
that calls your main routine
.id (main).
.np
.ix 'Tenberry Software' 'DOS/16M'
.ix 'DOS/16M'
.ix 'DOS Extender' '286' 'Tenberry Software'
The
.fi DOS16M.ASM
file is a special version of the
.fi CSTRT086.ASM
file which is required when using the Tenberry Software, Inc. DOS/16M
286 DOS extender.
.do end
.* WCC386 ------------------------------------------------------
.np
(32-bit only)
.if '&target' eq 'QNX' .do begin
These files are located in the directory:
.millust begin
/usr/lib/src/startup (QNX initialization)
.millust end
.np
The following is a summary list of the startup files for QNX.
.ix 'cstrt386.asm'
.ix 'cmain.c'
.ix 'mdef.inc'
.millust begin
cstrt386.asm (startup for small memory model)
mdef.inc (macros included by cstrt386.asm)
cmain.c (final part of initialization sequence)
.millust end
.pc
.ix 'cstrt386.asm'
.ix 'cmain.c'
The assembler file
.fi cstrt386.asm
contains the first part of the initialization code and the remainder
is continued in the file
.fi cmain.c.
It is
.fi cmain.c
that calls your mainline routine
.id (main).
.do end
.el .do begin
The initialization code directories/files are listed below:
.np
.cp 8
.us Under
.fi &pathnamup&pc.SRC&pc.STARTUP
.ix 'WILDARGV.C'
.ix '8087CW.C'
.millust begin
WILDARGV.C (wild card processing for argv)
8087CW.C (value loaded into 80x87 control word)
.millust end
.np
.cp 8
.us Under
.fi &pathnamup&pc.SRC&pc.STARTUP&pc.386
.ix 'CSTRT386.ASM'
.ix 'CSTRTW32.ASM'
.ix 'CSTRTX32.ASM'
.ix 'CMAIN386.C'
.millust begin
CSTRT386.ASM (startup for most DOS Extenders)
CSTRTW32.ASM (startup for 32-bit Windows)
CSTRTX32.ASM (startup for FlashTek DOS Extender)
CMAIN386.C (final part of initialization sequence)
.millust end
.np
.ix 'CMAIN386.C'
The assembler files
.fi CSTRT*.ASM
contain the first part of the initialization code and the remainder is
continued in the file
.fi CMAIN386.C.
It is
.fi CMAIN386.C
that calls your main routine
.id (main).
.do end
.* ------------------------------------------------------
.np
The source code is provided for those who wish to customize the
initialization sequence for special applications.
.if '&target' ne 'QNX' .do begin
.np
The file
.fi wildargv.c
contains an alternate form of "argv" processing in which wild card
command line arguments are transformed into lists of matching file
names.
Wild card arguments are any arguments containing "*" or "?" characters
unless the argument is placed within quotes (").
Consider the following example in which we run an application called
"TOUCH" with the argument "*.c".
.millust begin
&prompt.touch *.c
.millust end
.pc
Suppose that the application was linked with the object code for the
file
.fi wildargv.c.
Suppose that the files
.fi ap1.c
.ct ,
.fi ap2.c
and
.fi ap3.c
are stored in the current directory.
The single argument "*.c" is transformed into a list of arguments such
that:
.millust begin
argc == 4
argv[1] points to "ap1.c"
argv[2] points to "ap2.c"
argv[3] points to "ap3.c"
.millust end
.pc
The source file
.fi wildargv.c
must be compiled to produce the object file
.fi wildargv&obj..
This file must be specified before the &product libraries in the
linker command file in order to replace the standard "argv"
processing.
.do end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -