Giter VIP home page Giter VIP logo

docker-amigaos-cross-toolchain's Introduction

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!

docker-amigaos-cross-toolchain's People

Contributors

sebastianbergmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

rainisto

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.