
"READ.ME" for Zortech C++ for OS/2 2.0
======================================
Copyright (c) 1992 Symantec Corporation. All rights reserved.
November 11, 1992

Installation and System Configuration
-------------------------------------
After you install Zortech C++ you will need to make some
changes in your system files so that Zortech C++ and the IBM
Workframe know where to find the files. Setup gives you the option
to automatically update the config.sys file.
If you chose not to update automatically, make following changes:
(You will need to reboot for these changes to take effect.)

	Configuring Your System to Compiler OS/2 2.0 Programs
	-----------------------------------------------------
	To compile OS/2 2.0 programs make the following changes to your 
	config.sys file: (This example assumes you placed Zortech C++ on Drive C:
	in a directory named ZOROS2.)
	
		Add the directory "C:\ZOROS2\INCLUDE" to the SET INCLUDE directive.
		
			SET INCLUDE=C:\ZOROS2\INCLUDE;C:\TOOLKT20\C\OS2H;<possibly others>

		Add the directory "C:\ZOROS2\LIBOS2;C:\ZOROS2\LIBDOS" to the 
		SET LIB directive.
		
			SET LIB=C:\ZOROS2\LIBOS2;C:\ZOROS2\LIBDOS;C:\TOOLKT20\OS2LIB;
			
		Add the directory "C:\ZOROS2\BINOS2;" to your path.
		
	Configuring Your System to Compile OS/2 1.x Programs
	-----------------------------------------------------
	To compile OS/2 1.x programs make the following changes to your 
	config.sys file: (This example assumes you placed Zortech C++ on Drive C:
	in a directory named ZOROS2.)
	
		Add the directory "C:\ZOROS2\INCLUDE" to the SET INCLUDE directive.
		
			SET INCLUDE=C:\ZOROS2\INCLUDE;C:\TOOLKT20\C\OS2H;<possibly others>

		Add the directory "C:\ZOROS2\LIBOS1;C:\ZOROS2\LIBDOS" to the 
		SET LIB directive.
		
			SET LIB=C:\ZOROS2\LIBOS1;C:\ZOROS2\LIBDOS;C:\TOOLKT20\OS2LIB;
			
		Add the directory "C:\ZOROS2\BINOS1;" to your path.
		
The installation produces the following directories in \zoros2

  \INCLUDE - contains all include files
  \BINOS1  - contains 16 bit executables for OS/2 1.x
  \BINOS2  - contains 32 bit executables for OS/2 2.0
  \LIBOS1  - contains 16 bit libraries for OS/2 1.x.
  \LIBOS2  - contains 32 bit libraries for OS/2 2.0.
  \SAMPLES - contains sample programs
  \SOURCE  - contains all the library sources
  \TOOLS   - contains all the tools sources and library

Required Modifications to IBM Toolkit files:
--------------------------------------------
Line number 164 in file \toolkt20\os2h\bsedos.h uses the C++ reserved 
word 'class'. It must be renamed to eclass or something else to be
acceptable for the C++ compiler.
  
Sample Programs:
----------------
OS/2 sample programs can be found in the following directories:
         - ..\SAMPLES\ZTCPM
         - ..\SAMPLES\MENU
         - ..\SAMPLES\NUMBER
  
  
About the Flat Memory Model
---------------------------
	OS/2 2.0 32 bit applications must use the FLAT memory
	model, specified with the -mf switch. It is incompatible
	at the object level with the -mx and -mp models. This means
	that the same binary libraries cannot be used with both
	32 bit DOS extender and F model programs.

	The F model assembler interface is different from the X
	model interface. For instance:
	o	The default calling convention for C is _stdcall,
		rather than _cdecl.
	o	References to data must be FLAT relative, rather
		than DGROUP relative, as:
			ifdef __OS2__
				mov	EAX,offset FLAT:table
			else
				mov	EAX,offset DGROUP:table
			endif
	o	Floating point values are returned in the
		8087 ST0 register, rather than the CPU registers.
	The different segment setup is handled automatically by
	MACROS.ASM.

	To build an F model program, use the -mf switch with ZTC.
	The C runtime library is ZPF.LIB, the old stream library
	is OLDSTRF.LIB, and the operating system interface is
	OS2386.LIB.

	The default for ZTC is to build a 16 bit program.

_far16, _syscall, _stdcall
--------------------------
	Zortech C/C++ fully supports _far16 pointers and
	_far16 function calls.
	
	_syscall and _stdcall function types and syntax
	are also fully supported.

F Compiler
----------
	If you are running OS/2 2.0, the default compiler passes
	run are the 'F' versions, that are 32 bit native applications.
	To override this to use the 'B' OS/2 1.x compatible passes,
	use the -b switch. Note that both the 'F' and 'B' compiler
	passes are capable of generating both 16 and 32 bit applications,
	the only difference should be that the 'F' passes run faster.

Assemblers
----------
	We recommend using MASM386 as an assembler for OS/2 2.0. MASM 5.1 
	does not support the flat memory model, and MASM 6.0 generates 
	incorrect fixup records for external references to functions in flat model. 
	ZTC is configured to run MASM386 if the -mf switch is used.

Floating Point
--------------
	OS/2 2.0 has a built-in 80x87 emulator. 
	Float and double values are returned in ST0 rather than
	the CPU registers. Thus, inline 8087 code is always
	generated for the F model.

Libraries
---------
	The OS/2 2.0 libraries can be built without requiring the
	OS/2 2.0 SDK. The pertinent declarations are in
	PATH\INCLUDE\OS2LIB.H. 
	    (where PATH specifies location of zortech compiler)

	To build the F libraries:
		CD   PATH\SOURCE\OS2
		MAKE
		COPY ZPF.LIB  PATH\PLIB
		COPY OLDSTRF.LIB  PATH\PLIB
		COPY IF.OBJ  PATH\PLIB
		COPY _MAINF.OBJ  PATH\PLIB
