Skip to content
This repository has been archived by the owner. It is now read-only.
Dockerfile for AmigaOS Cross-Compiler Toolchain
PHP
Branch: master
Clone or download

Latest commit

Latest commit 9b8c7c9 Mar 12, 2018

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
Dockerfile
README.md
build.xml
bump.php
screenshot.png

README.md

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!
You can’t perform that action at this time.