mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-15 08:06:04 +02:00
53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
Wellcome to the MacOS port of FreePascal (FPC)
|
|
==============================================
|
|
|
|
It is considered under construction, at the moment.
|
|
|
|
|
|
Please note that compiling must be done on a platform
|
|
supported by FPC, e g a PC. Then the generated assemble files
|
|
is to be transfered to a Macintosh with MPW installed.
|
|
|
|
|
|
For compiling with FPC, use it as for other operating systems
|
|
and add these options:
|
|
|
|
-Tmacos # target macos
|
|
-dpowerpc
|
|
-al # dont delete asm output
|
|
-s # dont generate executable
|
|
|
|
Note that at the moment, FPC yells about not supporting
|
|
creating of executables at the platform, nevertheless
|
|
it creates all asm files to produce an application on the Mac.
|
|
|
|
|
|
Use MPW to assemble and link the output from FreePascal
|
|
|
|
For PPCAsm, use options:
|
|
|
|
-case on
|
|
|
|
For PPCLink, use options
|
|
|
|
-dead on
|
|
-tocdataref off
|
|
-m program_init
|
|
|
|
Note on the compiler implementation
|
|
===================================
|
|
|
|
Procedure pointers
|
|
------------------
|
|
The entries in the transition vector is used as procedure pointers.
|
|
That is the symbol xxx[DS].
|
|
|
|
Global variables
|
|
----------------
|
|
Currently all global variables are indirect, that is the entry in
|
|
the TOC is always a pointer to data. (In the future small data items
|
|
may be stored directly in the TOC, but I have not found out how this
|
|
is supported by PPCLink.)
|
|
|
|
Thus all references to globals are via a construct like:
|
|
lwz rX, yyy[TC](r2) ;loads a pointer to a global into rX |