2
0
mirror of https://frontier.innolan.net/github/amigaos-cross-toolchain6.git synced 2024-10-19 10:29:55 +00:00

Put together an example that works on A500.

This commit is contained in:
Krystian Bacławski
2014-01-05 01:03:48 +01:00
parent a3e87c32ae
commit c87ff419d1
3 changed files with 31 additions and 0 deletions

1
examples/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
hello

13
examples/Makefile Normal file
View File

@ -0,0 +1,13 @@
CC = m68k-amigaos-gcc -noixemul -s
CFLAGS = -Os -Wall -fomit-frame-pointer
all: hello
hello: LDLIBS = -lnix13
hello: CC += -fbaserel
hello: CFLAGS += -m68000 -msmall-code
hello: hello.c
clean:
rm -f hello
rm -f *.o *~

17
examples/hello.c Normal file
View File

@ -0,0 +1,17 @@
/* This example works even for Kickstart 1.3 ! */
#include <proto/exec.h>
#include <proto/dos.h>
int __nocommandline = 1;
int __initlibraries = 0;
struct DosLibrary *DOSBase = NULL;
int main() {
if ((DOSBase = (struct DosLibrary *) OpenLibrary("dos.library", 34))) {
Write(Output(), "Hello world!\n", 13);
CloseLibrary((struct Library *)DOSBase);
}
return 0;
}