Next:
List of Tables
Up:
Free Pascal Programmers' manual
Previous:
Free Pascal Programmers' manual
Contents
Contents
List of Tables
About this document
1
Compiler directives
1
Local directives
1
$A
or
$ALIGN
: Align Data
2
$ASMMODE
: Assembler mode (Intel 80x86 only)
3
$B
or
$BOOLEVAL
: Complete boolean evaluation
4
$C
or
$ASSERTIONS
: Assertion support
5
$DEFINE
: Define a symbol
6
$ELSE
: Switch conditional compilation
7
$ENDIF
: End conditional compilation
8
$ERROR
: Generate error message
9
$F
: Far or near functions
10
$FATAL
: Generate fatal error message
11
$GOTO
: Support
Goto
and
Label
12
$H
or
$LONGSTRINGS
: Use AnsiStrings
13
$HINT
: Generate hint message
14
$HINTS
: Emit hints
15
$IF
: Start conditional compilation
16
$IFDEF Name
: Start conditional compilation
17
$IFNDEF
: Start conditional compilation
18
$IFOPT
: Start conditional compilation
19
$INFO
: Generate info message
20
{$INLINE}
: Allow inline code.
21
$I
or
$IOCHECKS
: Input/Output checking
22
$I
or
$INCLUDE
: Include file
23
$I
or
$INCLUDE
: Include compiler info
24
$I386_XXX
: Specify assembler format (Intel 80x86 only)
25
$L
or
$LINK
: Link object file
26
$LINKLIB
: Link to a library
27
$M
or
$TYPEINFO
: Generate type info
28
$MACRO
: Allow use of macros.
29
$MAXFPUREGISTERS
: Maximum number of FPU registers for variables (Intel 80x86 only)
30
$MESSAGE
: Generate info message
31
$MMX
: Intel MMX support (Intel 80x86 only)
32
$NOTE
: Generate note message
33
$NOTES
: Emit notes
34
$OUTPUT_FORMAT
: Specify the output format
35
$P
or
$OPENSTRINGS
: Use open strings
36
$PACKENUM
: Minimum enumeration type size
37
$PACKRECORDS
: Alignment of record elements
38
$Q
$OVERFLOWCHECKS
: Overflow checking
39
$R
or
$RANGECHECKS
: Range checking
40
$SATURATION
: Saturation operations (Intel 80x86 only)
41
$SMARTLINK
: Use smartlinking
42
$STATIC
: Allow use of
Static
keyword.
43
$STOP
: Generate fatal error message
44
$T
or
$TYPEDADDRESS
: Typed address operator (@)
45
$UNDEF
: Undefine a symbol
46
$V
or
$VARSTRINGCHECKS
: Var-string checking
47
$WAIT
: Wait for enter key press
48
$WARNING
: Generate warning message
49
$WARNINGS
: Emit warnings
50
$X
or
$EXTENDEDSYNTAX
: Extended syntax
2
Global directives
1
$APPTYPE
: Specify type of application (Win32 and AmigaOS only)
2
$D
or
$DEBUGINFO
: Debugging symbols
3
$DESCRIPTION
: Application description
4
$E
: Emulation of coprocessor
5
$G
: Generate 80286 code
6
$INCLUDEPATH
: Specify include path.
7
$L
or
$LOCALSYMBOLS
: Local symbol information
8
$LIBRARYPATH
: Specify library path.
9
$M
or
$MEMORY
: Memory sizes
10
$MODE
: Set compiler compatibility mode
11
$N
: Numeric processing
12
$O
: Overlay code generation
13
$OBJECTPATH
: Specify object path.
14
$S
: Stack checking
15
$UNITPATH
: Specify unit path.
16
$W
or
$STACKFRAMES
: Generate stackframes
17
$Y
or
$REFERENCEINFO
: Insert Browser information
2
Using conditionals, messages and macros
1
Conditionals
1
Predefined symbols
2
Messages
3
Macros
3
Using Assembly language
1
Intel 80x86 Inline assembler
1
Intel syntax
2
AT&T Syntax
2
Motorola 680x0 Inline assembler
3
Signaling changed registers
4
Generated code
1
Units
2
Programs
5
Intel MMX support
1
What is it about?
2
Saturation support
3
Restrictions of MMX support
4
Supported MMX operations
5
Optimizing MMX support
6
Code issues
1
Register Conventions
1
accumulator register
2
accumulator 64-bit register
3
float result register
4
self register
5
frame pointer register
6
stack pointer register
7
scratch registers
8
Processor mapping of registers
2
Name mangling
1
Mangled names for data blocks
2
Mangled names for code blocks
3
Modifying the mangled names
3
Calling mechanism
4
Nested procedure and functions
5
Constructor and Destructor calls
6
Entry and exit code
1
Intel 80x86 standard routine prologue / epilogue
2
Motorola 680x0 standard routine prologue / epilogue
7
Parameter passing
1
Parameter alignment
2
Processor limitations
7
Linking issues
1
Using external code and variables
1
Declaring external function or procedures
2
Declaring external variables
3
Declaring the calling convention modifier
4
Declaring the external object code
2
Making libraries
1
Exporting functions
2
Exporting variables
3
Compiling libraries
4
Unit searching strategy
3
Using smart linking
8
Memory issues
1
The memory model.
2
Data formats
1
integer types
2
char types
3
boolean types
4
enumeration types
5
floating point types
6
pointer types
7
string types
8
set types
9
array types
10
record types
11
object types
12
class types
13
file types
14
procedural types
3
Data alignment
1
Typed constants and variable alignment
2
Structured types alignment
4
The heap
1
Heap allocation strategy
2
The heap grows
3
Debugging the heap
4
Writing your own memory manager
5
Using
DOS
memory under the Go32 extender
9
Resource strings
1
Introduction
2
The resource string file
3
Updating the string tables
4
GNU gettext
5
Caveat
10
Optimizations
1
Non processor specific
1
Constant folding
2
Constant merging
3
Short cut evaluation
4
Constant set inlining
5
Small sets
6
Range checking
7
And instead of modulo
8
Shifts instead of multiply or divide
9
Automatic alignment
10
Smart linking
11
Inline routines
12
Case optimization
13
Stack frame omission
14
Register variables
2
Processor specific
1
Intel 80x86 specific
2
Motorola 680x0 specific
3
Optimization switches
4
Tips to get faster code
5
Tips to get smaller code
11
Programming shared libraries
1
Introduction
2
Creating a library
3
Using a library in a pascal program
4
Using a pascal library from a C program
12
Using Windows resources
1
The resource directive
$R
2
Creating resources
3
Using string tables.
4
Inserting version information
5
Inserting an application icon
6
Using a pascal preprocessor
A. Anatomy of a unit file
1
Basics
2
reading ppufiles
3
The Header
4
The sections
5
Creating ppufiles
B. Compiler and RTL source tree structure
1
The compiler source tree
2
The RTL source tree
C. Compiler limits
D. Compiler modes
1
FPC mode
2
TP mode
3
Delphi mode
4
GPC mode
5
OBJFPC mode
E. Using
fpcmake
1
Introduction
2
Usage
3
Format of the configuration file
1
Clean
2
Defaults
3
Dirs
4
Info
5
Install
6
Libs
7
Packages
8
Postsettings
9
Presettings
10
Rules
11
Sections
12
Targets
13
Tools
14
Zip
4
Programs needed to use the generated makefile
5
Variables that affect the generated makefile
1
Environment variables
2
Directory variables
3
Compiler command-line variables
6
Variables set by
fpcmake
1
Directory variables
2
Target variables
3
Compiler command-line variables
4
Program names
5
File extensions
6
Target files
7
Rules and targets created by
fpcmake
1
Pattern rules
2
Build rules
3
Cleaning rules
4
archiving rules
5
Informative rules
F. Compiling the compiler yourself
1
Introduction
2
Before you begin
3
Compiling using
make
4
Compiling by hand
1
Compiling the RTL
2
Compiling the compiler
G. Compiler defines during compilation
H. Stack configuration
1
DOS
2
Linux
3
netbsd
4
freebsd
5
BeOS
6
Windows
7
OS/2
8
Amiga
9
Atari
I. Operating system specific behavior
Free Pascal Compiler
2001-09-22