Native XDS-x86 User's Guide
00 00 00 0000000000000000000000 About XDS Welcome to XDS Conventions used in this manual Language descriptions Source code fragments Getting started Using the Modula-2 compiler Using the Oberon-2 compiler Error reporting Building a program Debugging a program Configuring the compiler System search paths Working configuration XDS memory usage Directory hierarchies XDS search paths Redirection file Regular expression Options Configuration file Filename extensions Customizing compiler messages XDS and your C compiler Using the compiler Invoking the compiler Precedence of compiler options XDS compilers operation modes COMPILE mode MAKE mode PROJECT mode GEN mode BROWSE mode ALL submode BATCH submode OPTIONS submode EQUATIONS submode Files generated during compilation Modula-2 compiler Oberon-2 compiler Control file preprocessing Project files Make strategy Smart recompilation Template files Using equation values File name construction Iterators Examples Compiler options and equations Options Options reference __GEN_X86__ - code generation for 386/486/Pentium/PentiumPro __GEN_C__ - ANSI C code generation ASSERT - enable ASSERT generation BSCLOSURE - browse control option BSREDEFINE - browse control option CHANGESYM - permission to change a symbol file CHECKDINDEX - check of dynamic array bounds CHECKDIV - check for a positive divisor (DIV and MOD) CHECKINDEX - check of static array bounds CHECKNIL - NIL pointer dereference check CHECKPROC - check of a formal procedure call CHECKRANGE - range checks (range types and enumerations) CHECKSET - range check of set operations CHECKTYPE - dynamic type guards (Oberon-2 only) COVERFLOW - cardinal overflow check DBGNESTEDPROC - generate information about procedure nesting DBGQUALIDS - generate qualified identifiers in debug info DEFLIBS - put the default library names into object files DLLEXPORT - show exported objects to DLL clients DOREORDER - perform instruction scheduling FATFS - limit file names to 8.3 GCAUTO - enables implicit call of the garbage collector GENASM - generate assembly text GENCPREF - generate underscore prefixes GENDEBUG - generate code in the debug mode GENDLL - generate code for dynamic linking GENFRAME - always generate a procedure frame GENHISTORY - enable postmortem history GENPTRINIT - generate a local pointer initialization IMPLIB - use import libraries IOVERFLOW - integer overflow check LINENO - generate line numbers LONGNAME - use long names in batch files M2 - force the Modula-2 compiler M2ADDTYPES - add SHORT and LONG types M2BASE16 - use 16-bits basic types in Modula-2 M2CMPSYM - compare symbol files in Modula-2 M2EXTENSIONS - enable Modula-2 extensions MAIN - mark an Oberon-2 main module MAKEDEF - generate definition MAKEFILE - generate makefile NOHEADER - disable generation of a header file NOOPTIMIZE - disable machine-independent opimizations NOPTRALIAS - ignore pointer aliasing O2 - force the Oberon-2 compiler O2ADDKWD - enable additonal keywords in Oberon-2 O2EXTENSIONS - enable Oberon-2 extensions O2ISOPRAGMA - enable ISO Modula-2 pragmas in Oberon O2NUMEXT - enable Oberon-2 scientific extensions ONECODESEG - generate one code segment OVERWRITE - create a file, always overwrites the old one PROCINLINE - enable in-line procedure expansion SPACE - favor code size over speed STORAGE - enable the default memory management in Modula-2 TOPSPEED - enable Topspeed Modula-2-compatible extensions VERBOSE - produce verbose messages USEDLL - use DLL version of the run-time library VERSIONKEY - append version key to the module initialization VOLATILE - declare variables as volatile WOFF - suppress warning messages XCOMMENTS - preserve exported comments Equations Equations reference ALIGNMENT - data alignment ATTENTION - attention character in template files BATEXT - recompilation batch file extension BATNAME - batch file name BATWIDTH - maximum line width in a batch file BSDEF - pseudo-definition file created by browser extension BSTYLE - browse style CC - C compiler compatibility CODE - object file extension CODENAME - Code segment name COMPILERHEAP - heap limit of the compiler COMPILERTHRES - GC threshold of the compiler CPU - CPU to optimize for DATANAME - Data segment name DBGFMT - debug information format DECOR - control of compiler messages DEF - Modula-2 definition module extension DLLNAME - DLL name ENUMSIZE - default size of enumeration types ENV_HOST - host platform ENV_TARGET - target platform ERRFMT - error message format ERRLIM - maximum number of errors FILE - name of the file being compiled GCTHRESHOLD - garbage collector threshold HEAPLIMIT - generated program heap limit LINK - linker command line LOOKUP - lookup directive MINCPU - minimal CPU required for execution MKFEXT - makefile extension MKFNAME - makefile name MOD - Modula-2 implementation or main module extension MODULE - name of the module being compiled OBERON - Oberon-2 module extension OBJEXT - object file extension OBJFMT - object file format PRJ - project file name PRJEXT - project file extension PROJECT - project name SETSIZE - default size of small set types STACKLIMIT - generated program stack limit SYM - symbol file extension TABSTOP - tabulation alignment TEMPLATE - template name (for makefile) Error message format specification The system module COMPILER Compiler messages Lexical errors E001 E002 E003 E004 F005 E006 F010 E012 E171 E172 F173 F174 E175 Syntax errors E007 E008 E081 E082 E083 E085 E086 Semantic errors E020 E021 E022 E028 E023 E024 E025 E026 E027 E029 E030 E031 E032 E033 E034 E035 E036 E037 E038 E039 E040 E041 E043 E044 E046 E047 E048 E049 E050 E051 E052 E053 E054 E055 E057 E058 E059 E060 E061 E062 E064 E065 E067 E068 E069 E071 E072 E074 E075 E076 E078 E087 E088 E089 E090 E091 E092 E093 E094 E095 E096 E097 E098 E099 E100 E102 E107 E109 E110 E111 E112 E113 E114 E116 E118 E119 E120 E121 E122 E123 E124 E125 E126 E128 E129 E131 E132 E133 E134 E135 E136 E137 E139 E140 E141 E143 E144 E145 E146 E147 E148 E149 E150 E151 E152 E153 E154 E155 E156 E158 E159 E160 E161 E162 E163 E200 E201 E202 E203 E206 E208 E219 E220 E221 E281 E282 E283 Symbol files read/write errors F190 F191 F192 F193 F194 F195 Internal errors F103 F104 F105 F106 F142 F196 F197 Warnings W300 W301 W302 W303 W304 W305 W310 W311 W312 W314 W315 W316 W317 W318 Pragma warnings W320 W322 W321 W323 W390 Native XDS warnings W900 W901 W902 W903 W910 W911 W912 W913 W914 W915 Native XDS errors F950 F951 F952 XDS-C warnings W350 W351 W352 W353 Linking your program Starting the linker Using response files Seamless linking Input and output Specifying input files Specifying output format Producing an executable module Producing a dynamic link library Including debug information Generating a map file Linker return codes Linking with library files Linking with static libraries Linking with dynamic link libraries Setting linker options Setting options on the command line Setting numeric arguments Options reference /ALIGN - Alignment factor /BASE - Load address /DEBUG - Include debug info /DLL - Produce dynamic link library /ENTRY - Entry point /NOENTRY - No entry point /EXPORT - Define exported entities /EXTRAALIGNMENT - Align at 16-bytes boundary /FIXED - Omit relocation information /HEAPCOMMIT - Heap commit size /HEAPSIZE - Heap size /IMAGEFORMAT - Output file format /MAP - Produce map file /NAME - Output file name /SMART - Enable smart linking /NOSMART - Disable smart linking /STACKCOMMIT - Stack commit size /STACKSIZE - Stack size /STUB - Stub file /SYS - Application type /WARN - Warnings severity level Using export definition files Export definition file syntax Linker error and warning messages Using third-party linkers Managing libraries Starting XLIB Options File names Response files Commands Operation modes Library management Import library creation Library contents listing Export info extraction Supported formats Output library format Input object file format Input executable format Checking your program for errors Overview The OSA environment Symbol files Starting OSA Analysed configuration Analysis phases and stages Procedure call graph output How to speedup OSA analysis Analysing part of a program Saving a partially analysed program to file Excluding program parts from subsequent phases Simplified analysis of procedures Turning off context-insensitive analysis Turning off analysis of variable usage OSA messages Message modes Variables Contexts Variable denotations OSA options GRAPH - enable procedure call graph output CLOSED - assume well closed configuration ALLOCATE - assume standard heap manager SHOW - print names of analysed procedures MSYM - only make symbol files FIELD_ALIAS - assume variant field aliasing CI - enable context-insensitive phase CV - enable value calculation phase OSA equations TOP - fake top-level module SAVE_MEM - memory limit CUT - data flow analysis stop stage number SAVE - data flow analysis save stage number READ - continue a prefiously saved analysis ONE - analyse given procedures context-insensitively EU - analysis mode of EU phase INIT - default value for variables COLLECTMIN - minimal amount of memory for garbage collection COLLECTMAX - maximum amount of memory for garbage collection MSGEXT - message file extension IRFEXT - intermediate file extension GRFEXT - call graph file extension Analyzing your program profile Overview Execution tracing Visualisation XPDUMP Profile viewer XDS Modula-2 ISO Standard compliance Ordering of declarations New language's features Lexis Complex types Sets and packedsets Strings Value constructors Multi-dimensional open arrays Procedure type declarations Procedure constants Whole number division Type conversions NEW and DISPOSE Finalization Exceptions The system module EXCEPTIONS The system module M2EXCEPTION Termination Coroutines Protection Standard procedures Compatibility Expression compatibility Assignment compatibility Value parameter compatibility Variable parameter compatibility System parameter compatibility The Modula-2 module SYSTEM System types System functions System procedures Language extensions Lexical extensions Additional numeric types Type casting Assignment compatibility with BYTE Dynamic arrays Constant array constructors Set complement Read-only parameters Variable number of parameters Read-only export Renaming of imported modules NEW and DISPOSE for dynamic arrays HALT ASSERT Source code directives Inline options and equations Conditional compilation XDS Oberon-2 The Oberon environment Program structure Creating a definition Last changes to the language ASSERT Underscores in identifiers Source code directives Oakwood numeric extensions Complex numbers In-line exponentiation Using Modula-2 features Language extensions Comments String concatenation VAL function Read-only parameters Variable number of parameters Value constructors The Oberon-2 module SYSTEM Compatibility with BYTE Whole system types NEW and DISPOSE M2ADR Run-time support Memory management Postmortem history The oberonRTS module Types and variables Garbage collection Object finalization Meta-language facilities Module iterators Multilanguage programming Modula-2 and Oberon-2 Basic types Data structures Garbage collection Direct language specification Interfacing to C Foreign definition module External procedures specification Relaxation of compatibility rules Assignment compatibility Parameter compatibility Ignoring function result Configuring XDS for a C Compiler Possible problems Using an unsupported compiler Additional configuration options Optimizing a program Creating multithread programs Overview The multithread library Creating and destroying threads Operating system specifics Thread handles Event sources Volatile variables Exception handling Modula-2 exceptions System exceptions Dynamic linking How does the dynamic linking work Quick start Using dynamically linked run-time libraries Creating your own DLL Setting up the environment Controlling export from a DLL DLL initialization and termination Using your DLL Load-time dynamic linking Run-time dynamic linking DLLs intended for a foreign environment Low-level programming Data representation Modula-2 INTEGER and CARDINAL types Modula-2 BOOLEAN type Modula-2 enumeration types Modula-2 set types Pointer, address, and opaque types Procedure types Record types Array types Sequence parameters Calling and naming conventions General considerations Open arrays Oberon-2 records Result parameter Nested procedures Oberon-2 receivers Sequence parameters Order of parameters Stack cleanup Register usage Naming conventions Inline assembler Implemented features Basic syntax Labels Accessing Modula-2/Oberon-2 objects Known problems Potential problems Using the Win32 API Obtaining API documentation Using the Win32 API in your programs Windows.def: merged versus reexporting Reducing the size of Windows.def Building GUI applications Declaring callbacks Using resources Automatic resource binding Header files Generic GUI application Limitations and restrictions TopSpeed Compatibility Pak Conditional compilation Declarations and visibility Alias declaration Types Numeric types Sizes of base types Based and virtual pointers Compatibility with system types Objects and values Fixed variable placement Value constructors Expressions Function calls in designators Logical shift operators Comparison of structured values Statements CASE without ELSE FOR loop control variable GOTO statement Procedures External procedures Open arrray parameter compatibility Procedure types Predefined procedures Type conversion vs type cast Inline and code procedures Modules Import Hidden pointer base types Export from local module The module SYSTEM Intel x86 16-bit mode specifics Object oriented extensions Pragmae Pragma syntax Open array parameters passing Bitwise operations on cardinals Other pragmae XDS TS-like library Module FIO Module Graph Module IO Module Lib Module MATHLIB Module ShtHeap Module Str Module Window Multithreading Redistributable components