~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to packages/extra/amunits/README

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2004-08-12 16:29:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040812162937-moo8ulvysp1ln771
Tags: 1.9.4-5
fp-compiler: needs ld, adding dependency on binutils.  (Closes: #265265)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
Readme for the m68k compiler FPC 0.99.5c
 
3
----------------------------------------
 
4
 
 
5
Updated since last version:
 
6
  - alignment problems bugfixed -- now it works for real (I hope!)
 
7
  - CRC loading on big endian machines was wrong
 
8
 
 
9
1) m68k binaries
 
10
2) Cross-compiler binaries
 
11
3) General information and porting tips
 
12
 
 
13
1) m68k Binaries information
 
14
----------------------------
 
15
 
 
16
  Amiga binary version notes:
 
17
  ---------------------------
 
18
 
 
19
  Requirements:
 
20
    - 2 Megabytes RAM (Chip or Fast) minimum to produce assembler files
 
21
    - 1 Megabyte hard drive space
 
22
    - 128K stack space (set it via 'stack')
 
23
    - AmigaOS v2.04 or higher
 
24
 
 
25
  Further information:
 
26
    - Because the heap can become fragmented when using ld and as, sometimes
 
27
      you will no longer be able to run ppc after calling these programs,
 
28
      use avail flush or reboot your computer to solve this.
 
29
    - Because how the os works with files and because of a bug in the
 
30
      compiler, if an error occurs or a break signal is issued. some files
 
31
      might remain opened. This only happens with non units and non source
 
32
      code files such as ppc.cfg, the only way to fix this is to reboot
 
33
      the computer. As soon as i have the time, I will implement an exit
 
34
      procedure in the system unit which close all files automatically on
 
35
      any program termination.
 
36
    - gdb support is not implemented, as it requires an interface
 
37
      to ixemul.library
 
38
    - as 2.5.2 and ld 2.8.1 are used in this package, since as 2.8.1 seems
 
39
      to be buggy (at least the version i downloaded) with gdb info
 
40
    - A good debugging tool to use is barfly available from Aminet
 
41
 
 
42
  Atari binary version notes:
 
43
  ---------------------------
 
44
 
 
45
  Requirements:
 
46
    - 2 Megabytes RAM minimum to produce assembler files
 
47
    - 1 Megabyte hard drive space
 
48
    - GemDOS 0.15 or higher
 
49
    - Atari Extended Argument Specification compatible shell
 
50
 
 
51
 
 
52
2) Cross-compiler binaries
 
53
--------------------------
 
54
 
 
55
   PC/MS-DOS version
 
56
   ------------------
 
57
    - 2 Megabytes RAM minimum to produce assembler files
 
58
    - 1 Megabyte hard drive space
 
59
    - DOS 3.3 and higher
 
60
    - 16-bit dpmi server (one is supplied with the binary)
 
61
 
 
62
    A default configuration can be found in ppc.cfg, and the
 
63
    sysatari library source code is in the ./src/ directory.
 
64
 
 
65
    This can be used as a template for embedded processor
 
66
    development, you just need to replace all sysatari
 
67
    routines by emtpy ones (for example), most other routines
 
68
    in the include file should be kept (some of them are internal)
 
69
 
 
70
   PC/Linux version
 
71
   -----------------
 
72
    - 2 Megabytes RAM minimum to produce Amiga binaries
 
73
    - 2 Megabyte hard drive space with all binaries,
 
74
      compiler, assembler and linker + rtl.
 
75
 
 
76
    - amigaas, gnu as, a crossversion, included
 
77
    - amigald, gnu ld, a crossversion, included
 
78
 
 
79
    The compiler will read pp68k.cfg for configuration the
 
80
    proper place for this is in /etc. A default pp68k.cfg is
 
81
    in /bin/.
 
82
 
 
83
    Just make sure that pp68k, amigaas and amigald is in
 
84
    your path, why not /usr/local/bin
 
85
 
 
86
3) General information and porting tips
 
87
---------------------------------------
 
88
 
 
89
  - Alignment output is supposedely correct even though i can't
 
90
    personally test this. (Someone else tested for me)
 
91
  - Some tips to port some general code from i386 FPC to m68k FPC,
 
92
    you should limit your local variables and pushed variables
 
93
    in a routine 32K, this is a displacement limit of older m68k
 
94
    processors, and it has been kept.
 
95
  - If you use PACKED records anywhere, make sure that non-byte fields
 
96
    are aligned on even addresses, otherwise this will cause
 
97
    alignment errors on older m68k processors (68000/68010), if
 
98
    you don't use packed , disregard this remark, as everything
 
99
    will be automatically aligned. The compiler takes care of
 
100
    of aligning all local and global simple type variables on
 
101
    at least word boundaries (for the m68k only). pointer are always
 
102
    at least aligned on dword boundaries.
 
103
  - PPU files (PP? files) are portable across big-endian and little
 
104
    endian systems, EXCEPT in the case where the unit references
 
105
    floating point values, as these are not saved in the correct
 
106
    endian for the moment.
 
107
  - GNU assembler (gas) syntax acceptance varies widely between gas versions
 
108
    ,therefore the -Ai and -Agas switches are your friend here. If you
 
109
    still get trouble try, -TPALMOS as a target, this changes to more
 
110
    standard assembler. Finally in any case you can always the
 
111
    --register-prefix-optional options in any GNU assembler version if it
 
112
    still does not work.
 
113
  - To compile a system unit use these switches:
 
114
      TARGET -dm68k -Sg -Us mysystem.pp
 
115
          where TARGET can be:
 
116
            -TAMIGA, -TATARI , -TLINUX or -TPALMOS
 
117
            mysystem.pp should be replaced by the system unit name
 
118
            for the platform:
 
119
             amiga: sysamiga.pas
 
120
             atari: sysatari.pas
 
121
             linux: syslinux.pp
 
122
             palmos: syspalm.pp
 
123
  - BIG sets (with more then different 32 values) are stored in little
 
124
    endian format. This can cause BIG problems if you use exotic set
 
125
    functions like an array of byte typecast to a set, the values should
 
126
    be byteswapped first to conform to little (intel) endian format. If
 
127
    you use normal set functions such as addition, subtraction, in operator
 
128
    you should not get any problems. I'm not sure if this is worth fixing
 
129
    or not :(...
 
130
  - Because of how everything works now, BYTE pushes are stored in byte
 
131
    reversed format in a word on the stack. This behavior should not
 
132
    be noticeable unless you do very low level stuff. The downside of this
 
133
    is that linking with external routines which expect bytes as parameters
 
134
    will probably not work. This will be fixed, just need to find the
 
135
    time to do it.
 
136
 
 
137
Enjoy! BTW: I still need help in porting to Mac, Linux and Atari and
 
138
also someone to do a peephole optimizer for the m68k code output.
 
139
 
 
140
You can get general Free Pascal information at:
 
141
 http://www.brain.uni-freibrug.de/~klaus/fpc/fpc.html
 
142
Developer mailing list:
 
143
 fpc-devel@mail.terrasoft.hu
 
144
 
 
145
You can contact me at:
 
146
 codc01@gel.usherb.ca
 
147
 http://www-edu.gel.usherb.ca/codc01
 
148
Amiga inlucdes/units and Amiga specific stuff:
 
149
 nils.sjoholm@mailbox.swipnet.se
 
150
 
 
151
Thanks:
 
152
  That is apart from the FPC development team (which i am part)....:
 
153
 
 
154
    Nils Sjoholm - AMIGA porter and tester, 68000 tester,
 
155
      the most dedicated person for the m68k port found so far!
 
156
 
 
157
                                    Enjoy!
 
158
                                    Carl Eric Codere
 
159
 
 
160