README.txt 6.4 KB

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