Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

Dockerfile for AmigaOS Cross-Compiler Toolchain

Notifications You must be signed in to change notification settings

sebastianbergmann/docker-amigaos-cross-toolchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerfile for AmigaOS Cross-Compiler Toolchain

Dockerfile for Stefan "Bebbo" Franke's fork of Krystian Bacławski's AmigaOS Cross-Compiler Toolchain.

A ready-to-use image built from this Dockerfile is available on Docker Hub.

"Hello world!" Example

C

AmigaOS C API

hello.c from Radosław Kujawa:

#include <proto/exec.h>
#include <proto/dos.h>

int main(int argc, void *argv[])
{
    struct Library *SysBase;
    struct Library *DOSBase;

    SysBase = *((struct Library **)4UL);
    DOSBase = OpenLibrary("dos.library", 0);

    if (DOSBase) {
        Write(Output(), "Hello world!\n", 13);
        CloseLibrary(DOSBase);
    }

    return(0);
}

Standard C Library

hello.c from Radosław Kujawa:

#include <stdio.h>

int main()
{
    printf("Hello world!\n");

    return(0);
}

Compilation

$ docker run -v $HOME:/host -it sebastianbergmann/m68k-amigaos-bebbo \
  m68k-amigaos-gcc /host/hello.c -o /host/hello -noixemul

Assembly

hello.s from Grzegorz Kraszewski:

SysBase      = 4
OpenLibrary  = -552
CloseLibrary = -414
PutStr       = -948

             LEA     DosName,A1
             MOVEQ   #36,D0
             MOVEA.L SysBase,A6
             JSR     OpenLibrary(A6)

             TST.L   D0
             BEQ.S   NoDos

             MOVE.L  #Hello,D1
             MOVEA.L D0,A6
             JSR     PutStr(A6)

             MOVEA.L A6,A1
             MOVEA.L SysBase,A6
             JSR     CloseLibrary(A6)

NoDos        CLR.L   D0
             RTS

DosName      DC.B    "dos.library",0
Hello        DC.B    "Hello World!",10,0
$ docker run -v $HOME:/host -it sebastianbergmann/m68k-amigaos-bebbo \
  vasm -Fhunkexe -o /host/hello /host/hello.s

Execution

Docker-ized Emulation using FS-UAE

The docker-execute-amiga script used below can be downloaded from here.

$ docker-execute-amiga helloworld

Screenshot

Docker-ized Emulation using Virtual AmigaOS (vamos)

$ docker run -v $HOME:/host sebastianbergmann/amitools:latest \
  vamos -C 68020 /host/hello
Hello world!

About

Dockerfile for AmigaOS Cross-Compiler Toolchain

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages