mirror of
https://github.com/cahirwpz/amigaos-cross-toolchain
synced 2026-09-11 19:59:18 +00:00
Put together an example that works on A500.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
hello
|
||||
@@ -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 *~
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user