Browse Source

+ Remarks by Dominik Deobald implemented

michael 26 years ago
parent
commit
fa91ee8dfb
2 changed files with 42 additions and 33 deletions
  1. 24 19
      docs/prog.tex
  2. 18 14
      docs/user.tex

+ 24 - 19
docs/prog.tex

@@ -308,10 +308,10 @@ compilation continues as if the directive wasn't there.
 
 
 \subsection{\var{\$IFOPT} : Start conditional compilation}
 \subsection{\var{\$IFOPT} : Start conditional compilation}
 
 
-The \var{\{\$IFOPT switch\}} will skip the compilation of the text that
-follows it if the switch \var{switch} is currently not in the specified 
-state.  If it is in the specified state, then compilation continues as if the directive 
-wasn't there. 
+The \var{\{\$IFOPT switch\}} will compile the text that follows it if the
+switch \var{switch} is currently in the specified state.
+If it isn't in the specified state, then compilation continues after the
+corresponding \var{\{\$ENDIF\}} directive.
 
 
 As an example:
 As an example:
 \begin{verbatim}
 \begin{verbatim}
@@ -511,13 +511,18 @@ the same as the \var{\{\$INFO\}} directive.
  
  
 \subsection{\var{\$MMX} : Intel MMX support}
 \subsection{\var{\$MMX} : Intel MMX support}
 As of version 0.9.8, \fpc supports optimization for the \textbf{MMX} Intel
 As of version 0.9.8, \fpc supports optimization for the \textbf{MMX} Intel
-processor (see also \ref{ch:MMXSupport}). This optimizes certain code parts for the \textbf{MMX} Intel
+processor (see also \ref{ch:MMXSupport}).
+
+This optimizes certain code parts for the \textbf{MMX} Intel
 processor, thus greatly improving speed. The speed is noticed mostly when
 processor, thus greatly improving speed. The speed is noticed mostly when
 moving large amounts of data. Things that change are
 moving large amounts of data. Things that change are
 \begin{itemize}
 \begin{itemize}
 \item Data with a size that is a multiple of 8 bytes is moved using the
 \item Data with a size that is a multiple of 8 bytes is moved using the
 \var{movq} assembler instruction, which moves 8 bytes at a time
 \var{movq} assembler instruction, which moves 8 bytes at a time
 \end{itemize}
 \end{itemize}
+Remark that MMX support is NOT emulated on non-MMX systems, i.e. if
+the processor doesn't have the MMX extensions, you cannot use the MMX
+optimizations.
 
 
 When \textbf{MMX} support is on, you aren't allowed to do floating point
 When \textbf{MMX} support is on, you aren't allowed to do floating point
 arithmetic. You are allowed to move floating point data, but no arithmetic
 arithmetic. You are allowed to move floating point data, but no arithmetic
@@ -585,8 +590,6 @@ wasm & assembler for the Watcom assembler. \\ \hline
 
 
 \subsection{\var{\$P} or \var{\$OPENSTRINGS} : Use open strings}
 \subsection{\var{\$P} or \var{\$OPENSTRINGS} : Use open strings}
 
 
-This switch is provided for compatibility only, as open strings aren't
-implemented yet.
 
 
 \subsection{\var{\$PACKENUM} : Minimum enumeration type size}
 \subsection{\var{\$PACKENUM} : Minimum enumeration type size}
 
 
@@ -726,7 +729,7 @@ parameters of the procedure.
 
 
 \subsection{\var{\$WAIT} : Wait for enter key press}
 \subsection{\var{\$WAIT} : Wait for enter key press}
 
 
-If the compiler encaounters a
+If the compiler encounters a
 \begin{verbatim}
 \begin{verbatim}
 {$WAIT }
 {$WAIT }
 \end{verbatim}
 \end{verbatim}
@@ -853,7 +856,7 @@ Wher \var{StackSize} and \var{HeapSize} should be two integer values,
 greater than 1024. The first number sets the size of the stack, and the
 greater than 1024. The first number sets the size of the stack, and the
 second the size of the heap. (Stack setting is ignored under \linux).
 second the size of the heap. (Stack setting is ignored under \linux).
 The two numbers can be set on the command line using the \var{-Ch}
 The two numbers can be set on the command line using the \var{-Ch}
-(and \var{-Cs} switches.
+and \var{-Cs} switches.
 
 
 \subsection{\var{\$MODE} : Set compiler compatibility mode}
 \subsection{\var{\$MODE} : Set compiler compatibility mode}
 
 
@@ -944,7 +947,7 @@ Defining a symbol goes as follows:
 \begin{verbatim}
 \begin{verbatim}
 {$Define Symbol }
 {$Define Symbol }
 \end{verbatim}
 \end{verbatim}
-From this point on in your code, the compiler know the symbol \var{Symbol}
+From this point on in your code, the compiler knows the symbol \var{Symbol}.
 Symbols are, like the Pascal language, case insensitive.
 Symbols are, like the Pascal language, case insensitive.
 
 
 You can also define a symbol on the command line. the \var{-dSymbol} option
 You can also define a symbol on the command line. the \var{-dSymbol} option
@@ -1006,10 +1009,12 @@ you should change \var{v} with the version number of the compiler
 you're using, \var{r} with the release number and \var{p}
 you're using, \var{r} with the release number and \var{p}
 with the patch-number of the compiler. 'OS' needs to be changed by the type
 with the patch-number of the compiler. 'OS' needs to be changed by the type
 of operating system. Currently this can be one of \var{DOS}, \var{GO32V2},
 of operating system. Currently this can be one of \var{DOS}, \var{GO32V2},
-\var{LINUX}, \var{OS2}, \var{WIN32}, \var{MACOS}, \var{AMIGA} or \var{ATARI}. This symbol is undefined if you
-specify a target that is different from the platform you're compiling on.
-the \var{-TSomeOS} option on the command line will define the \var{SomeOS} symbol,
-and will undefined the existing platform symbol\footnote{In versions prior to
+\var{LINUX}, \var{OS2}, \var{WIN32}, \var{MACOS}, \var{AMIGA} or \var{ATARI}.
+
+This symbol is undefined if you specify a target that is different from the
+platform you're compiling on.
+The \var{-TSomeOS} option on the command line will define the \var{SomeOS} symbol,
+and will undefine the existing platform symbol\footnote{In versions prior to
 0.9.4, this didn't happen, thus making Cross-compiling impossible.}.
 0.9.4, this didn't happen, thus making Cross-compiling impossible.}.
 
 
 \begin{FPCltable}{c}{Symbols defined by the compiler.}{Symbols} \hline
 \begin{FPCltable}{c}{Symbols defined by the compiler.}{Symbols} \hline
@@ -1029,9 +1034,9 @@ symbol, and will define the \var{OS2} symbol.
 {\em Remark: } Symbols, even when they're defined in the interface part of 
 {\em Remark: } Symbols, even when they're defined in the interface part of 
 a unit, are not available outside that unit.
 a unit, are not available outside that unit.
 
 
-\fpc supports the \var{\{\$IFOPT \}} directive for Turbo Pascal
-compatibility, but doesn't act on it. It always rejects the condition, so
-code between \var{\{\$IFOPT \}} and \var{\{\$Endif\}} is never compiled.
+%\fpc supports the \var{\{\$IFOPT \}} directive for Turbo Pascal
+%compatibility, but doesn't act on it. It always rejects the condition, so
+%code between \var{\{\$IFOPT \}} and \var{\{\$Endif\}} is never compiled.
 
 
 Except for the Turbo Pascal constructs, from version 0.9.8 and higher,
 Except for the Turbo Pascal constructs, from version 0.9.8 and higher,
 the \fpc compiler also supports a stronger conditional compile mechanism:
 the \fpc compiler also supports a stronger conditional compile mechanism:
@@ -1051,7 +1056,7 @@ in which case they are evaluated using numbers\footnote{Otherwise
 \var{\{\$If 8>54} would evaluate to \var{True}}.
 \var{\{\$If 8>54} would evaluate to \var{True}}.
 If the complemete expression evaluates to \var{'0'}, then it is considered 
 If the complemete expression evaluates to \var{'0'}, then it is considered 
 false and rejected. Otherwise it is considered true and accepted. This may
 false and rejected. Otherwise it is considered true and accepted. This may
-have unsexpected consequences :
+have unexpected consequences :
 \begin{verbatim}
 \begin{verbatim}
 {$If 0}
 {$If 0}
 \end{verbatim}
 \end{verbatim}
@@ -3685,4 +3690,4 @@ parameters when implementing the function or procedure.
 \item PChars are converted to strings automatically.
 \item PChars are converted to strings automatically.
 \end{enumerate}
 \end{enumerate}
 
 
-\end{document}
+\end{document}

+ 18 - 14
docs/user.tex

@@ -56,7 +56,7 @@ nor a definition of the Pascal language. Look at the
 \refref for these things. 
 \refref for these things. 
 For a description of the
 For a description of the
 possibilities and the inner workings of the compiler, see the
 possibilities and the inner workings of the compiler, see the
-\progref. In the appendices of this document you will find lists of 
+\progref . In the appendices of this document you will find lists of 
 reserved words and compiler error messages (with descriptions).
 reserved words and compiler error messages (with descriptions).
 
 
 This document describes the compiler as it is/functions at the time of 
 This document describes the compiler as it is/functions at the time of 
@@ -71,14 +71,16 @@ The \file{README} files are, in case of conflict with this manual,
 % About the compiler
 % About the compiler
 \section{About the compiler}
 \section{About the compiler}
 \fpc is a 32-bit compiler for the i386 and m68k processors\footnote{Work is being done
 \fpc is a 32-bit compiler for the i386 and m68k processors\footnote{Work is being done
-on a port to ALPHA Architecture}. Currently, it supports 3 operating systems:
+on a port to ALPHA Architecture}. Currently, it supports 6 operating systems:
 \begin{itemize}
 \begin{itemize}
 \item \dos
 \item \dos
 \item \linux
 \item \linux
+\item \atari (version 0.99.5 only)
+\item \amiga (version 0.99.5 only)
 \item \windowsnt
 \item \windowsnt
+\item \ostwo (using the EMX package, so it also works on DOS/Windows)
 \end{itemize}
 \end{itemize}
-and work is in progress to port it to other platforms (notably, \ostwo and
-).
+and work is in progress to port it to other platforms (notably, \freebsd).
 
 
 \fpc is designed to be, as much as possible, source compatible with 
 \fpc is designed to be, as much as possible, source compatible with 
 Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet attained), 
 Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet attained), 
@@ -269,7 +271,7 @@ allows you to do an installation if you don't have root permissions.
 When downloading the \var{.tar} file, or the separate files,
 When downloading the \var{.tar} file, or the separate files,
  installation is more interactive.
  installation is more interactive.
 
 
-I nCAse you downloaded the \file{.tar} file, you should first untar 
+In case you downloaded the \file{.tar} file, you should first untar 
 the file, in some directory where 
 the file, in some directory where 
 you have write permission, using the following command:
 you have write permission, using the following command:
 \begin{verbatim}
 \begin{verbatim}
@@ -365,13 +367,13 @@ To compile a program (e.g \verb|demo\hello.pp|) simply type :
 \begin{verbatim}
 \begin{verbatim}
   ppc386 hello
   ppc386 hello
 \end{verbatim}
 \end{verbatim}
-at the command prompt. If you don't have a configuretion file, then you may
+at the command prompt. If you don't have a configuration file, then you may
 need to tell the compiler where it can find the units, for instance as
 need to tell the compiler where it can find the units, for instance as
 follows:
 follows:
 \begin{verbatim}
 \begin{verbatim}
 ppc386 -Upc:\pp\rtl\dos\go32v2 hello
 ppc386 -Upc:\pp\rtl\dos\go32v2 hello
 \end{verbatim}
 \end{verbatim}
-under \dos, and under\linux you could type
+under \dos, and under \linux you could type
 \begin{verbatim}
 \begin{verbatim}
 ppc386 -Up/usr/lib/fpc/0.99.7/linuxunits hello
 ppc386 -Up/usr/lib/fpc/0.99.7/linuxunits hello
 \end{verbatim}
 \end{verbatim}
@@ -404,7 +406,7 @@ Here we describe the essentials to compile a program and a unit.
 We also describe how to make a stand-alone executable of the 
 We also describe how to make a stand-alone executable of the 
 compiled program under \dos. For more advanced uses of the compiler, 
 compiled program under \dos. For more advanced uses of the compiler, 
 see the section on configuring the compiler, and the 
 see the section on configuring the compiler, and the 
-\progref.
+\progref{}.
 
 
 The examples in this section suppose that you have a \file{ppc386.cfg} which
 The examples in this section suppose that you have a \file{ppc386.cfg} which
 is set up correctly, and which contains at least the path setting for the
 is set up correctly, and which contains at least the path setting for the
@@ -743,6 +745,8 @@ On the command line, and the \file{strip} program will remove all unnecessary
 information from your program. This can lead to size reductions of up to
 information from your program. This can lead to size reductions of up to
 30 \%.
 30 \%.
 
 
+{\em remark: in the \win32{} version, strip is called stripw}
+
 You can use the \var{-Xs} switch to let the compiler do this stripping
 You can use the \var{-Xs} switch to let the compiler do this stripping
 automatically at program compile time (the switch has no effect when
 automatically at program compile time (the switch has no effect when
 compiling units). 
 compiling units). 
@@ -995,7 +999,7 @@ caution).
 \item[u] uncertain optimizations
 \item[u] uncertain optimizations
 \item[1] Level 1 optimizations (quick optimizations).
 \item[1] Level 1 optimizations (quick optimizations).
 \item[2] Level 2 optimizations (\var{-O1} plus some slower optimizations).
 \item[2] Level 2 optimizations (\var{-O1} plus some slower optimizations).
-\item[3] Level 2 optimizations (\var{-O2} plus \var{-Ou}).
+\item[3] Level 3 optimizations (\var{-O2} plus \var{-Ou}).
 \item[Pn] Specify processor: \var{n} can be one of 
 \item[Pn] Specify processor: \var{n} can be one of 
 \begin{description}
 \begin{description}
 \item[1] optimize for 386/486
 \item[1] optimize for 386/486
@@ -1014,11 +1018,11 @@ executable.
 \item[-Txxx] \olabel{T}Specifies the target operating system. \var{xxx} can be one of
 \item[-Txxx] \olabel{T}Specifies the target operating system. \var{xxx} can be one of
 the following:
 the following:
 \begin{itemize}
 \begin{itemize}
-\item \textbf{GO32V1} : \dos and version 1 of the DJ DELORIE extender.
+\item \textbf{GO32V1} : \dos and version 1 of the DJ DELORIE extender (no longer maintained).
 \item \textbf{GO32V2} : \dos and version 2 of the DJ DELORIE extender.
 \item \textbf{GO32V2} : \dos and version 2 of the DJ DELORIE extender.
 \item \textbf{LINUX} : \linux.
 \item \textbf{LINUX} : \linux.
 \item \textbf{OS2} : OS/2 (2.x) (this is still under development).
 \item \textbf{OS2} : OS/2 (2.x) (this is still under development).
-\item \textbf{WIN32} : Windows 32 bit (this is still under development).
+\item \textbf{WIN32} : Windows 32 bit.
 \end{itemize}
 \end{itemize}
 \item [-uxxx] \olabel{u} undefine the symbol \var{xxx}. This is the opposite
 \item [-uxxx] \olabel{u} undefine the symbol \var{xxx}. This is the opposite
 of the \var{-d} option.
 of the \var{-d} option.
@@ -1251,7 +1255,7 @@ Syntax:
 #INCLUDE filename
 #INCLUDE filename
 \end{verbatim}
 \end{verbatim}
 \var{\#INCLUDE} instructs the compiler to read the contents of
 \var{\#INCLUDE} instructs the compiler to read the contents of
-\file{filename} before continuing to process the current file.
+\file{filename} before continuing to process options in the current file.
 
 
 This can be useful if you want to have a particular configuration file
 This can be useful if you want to have a particular configuration file
 for a project (or, under \linux, in your home directory), but still want to
 for a project (or, under \linux, in your home directory), but still want to
@@ -2636,7 +2640,7 @@ a slash.
 \end{description}
 \end{description}
 
 
 \chapter{Run time errors}
 \chapter{Run time errors}
-The \fpc Run-tim library generates the following errors at run-time
+The \fpc Run-time library generates the following errors at run-time
 \footnote{The \linux port will generate only a subset of these.}:
 \footnote{The \linux port will generate only a subset of these.}:
 
 
 \begin{description}
 \begin{description}
@@ -2869,4 +2873,4 @@ document pst
 end    
 end    
 \end{verbatim}
 \end{verbatim}
 
 
-\end{document}
+\end{document}