fpc/rtl/macos
2004-02-04 15:17:16 +00:00
..
macostp.inc + new include file containing portions of MacOS api, written in turbo dialect 2003-10-17 23:41:18 +00:00
Makefile * misc fixes 2004-02-04 15:10:37 +00:00
Makefile.fpc * misc fixes 2004-02-04 15:10:37 +00:00
README no message 2003-01-13 17:19:22 +00:00
system.pp * internal changes 2004-02-04 15:17:16 +00:00

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