Short: examples to create MorphOS shared libraries Author: Ilkka Lehtoranta (ilkleht@isoveli.org) Uploader: Ilkka Lehtoranta (ilkleht isoveli org) Type: dev/misc Version: 1.0 Architecture: ppc-morphos Here are programming examples for MorphOS to create PPC native shared libraries. There are four different types of examples: Library_m68k ------------ This is PPC native library using M68k ABI. Parameters are passed via virtual 68k registers (d0-d7/a0-a5, library base in a6). Functions are callable from 68k and PPC code. Despite of M68k ABI the function calling mechanism is fully PPC native unless library vector is patched by 68k code. Library_sysv ------------ This is PPC native library using SysV ABI. Parameters are passed via PPC registers and functions are callable from PPC code only. 68k programs can't have an access to SysV functions. Library_mixed ------------- This is PPC native library where SysV ABI and M68k ABI entries are mixed into user function area. Library_68kgate --------------- This is PPC native library using M68k ABI. It is simple wrapper for SysV library making it possible to call SysV functions from 68k code. This is like previously introduced Library_M68k version but not meant to be used by PPC native code. Examples: There are two makefiles: one for GCC and another (makefile.vbcc) for VBCC. Since I don't have have VBCC at the moment VBCC support is completely untested and may fail. Makefiles are able to generate required header files for libraries but only GCC is fully supported. FD2Pragma which is used for VBCC doesn't seem to support "sysv function without base" format (sysv) or mixed entries. Please note all examples are work in progress and may not work at all or have strange bugs. Ilkka Lehtoranta, 9th January 2005