Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Barthelmann V.VBCC compiler system.2004.pdf
Скачиваний:
12
Добавлен:
23.08.2013
Размер:
390.02 Кб
Скачать

74

vbcc manual

11.5.6 Minimal startup

The provided minimal startup code (‘minstart.o’) is used similarly like the one for 68k (See Section 11.4.6 [Minimal startup], page 69). Only use it if you know what you are doing.

11.5.7 libamiga.a

To write programs accessing AmigaOS (rather than standard C functions only), a replacement for the original (copyrighted) ‘amiga.lib’ is provided with vbcc. This replacement (‘libamiga.a’) automatically performs a necessary context switch to the 68k to execute the system call. Furthermore, it is adapted to vbcc, does not cause collisions with some functions (e.g. sprintf) provided by the original ‘amiga.lib’ and is available in small data.

Specify ‘-lamiga’ to link with ‘libamiga.a’.

11.5.8 libauto.a

This library corresponds to the AmigaOS/68k version (See Section 11.4.8 [auto.lib], page 70).

11.5.9 libextra.a

This library corresponds to the AmigaOS/68k version (See Section 11.4.9 [extra.lib], page 71).

11.6 WarpOS/PPC

This section describes specifics of the C library for WarpOS/PPC. The relevant files are ‘startup.o’, ‘vc.lib’, ‘m.lib’ ‘amiga.lib’ and ‘extra.lib’.

11.6.1 Startup

The startup code ‘startup.o’ sets up some global variables and initializes stdin, stdout and stderr. The exit code closes all open files and frees all memory. If you link with a math library the startup/exit code will be taken from there if necessary.

11.6.2 Floating point

Note that you have to link with a math library if you want to use floating point. All math functions, special startup code and printf/scanf functions which support floating point are contained in the math libraries only.

The math library (‘m.lib’) contains functions from Sun’s portable floating point library. Additionally, there is a vbcc version of Andreas Heumann’s ‘ppcmath.lib’. These routines are linked against Motorola’s floating point routines optimized for PowerPC and therefore are much faster.