💾 Archived View for gem.arisamiga.rocks › post › newlanguage.gmi captured on 2024-05-26 at 14:49:13. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-26)

-=-=-=-=-=-=-

New Year, New Language!

Happy New Year everyone!

So Recently I have been interested in learning **C** specifically because of the Amiga.

Amiga [IMG]

What's an Amiga?

Amiga is a family of personal computers introduced by Commodore in 1985. The original model is one of a number of mid-1980s computers with 16- or 16/32-bit processors, 256 KB or more of RAM, mouse-based GUIs, and significantly improved graphics and audio compared to previous 8-bit systems.

I always have wanted to learn C and now I can use the Amiga as a platform to learn it!

I had been quite worried about starting to learn C because of the syntax and the fact that I would have to learn a new language that is more low-level than what I am used to.

But I have been reading up on it and I have been watching some videos on it and I have to say I am quite excited to learn it.

So of course I had to write the classic **"Hello World"** program.

C Hello World [IMG]

Which I managed to do. I have to say it reminded me of working with a mix of python and Java.

Now A thing that Low-level languages have is that I have to compile them. So I have been using **GCC** to compile my code.

And I can just use the command `gcc -o hello hello.c` to compile my code.

But Because I want to learn how to run this code on the Amiga I have to use a different compiler.

What's a Compiler?

A compiler is a computer program that transforms source code written in a programming language (the source language) into another computer language (the target language).

I came Across

docker4AmigaVBCC

By

George Sokianos

Which is a docker image with a VBCC compiler for AmigaOS 3 & 4 cross-compiling and it has been a great help.

What is Cross Compiling?

Cross-compiling is the process of compiling code on one system for another system.

With this I can write my code in any system I want that has docker installed and then compile it using the docker image by doing `vc +aos68k -o hello hello.c` and it will compile my code to a binary file that I can run on the Amiga!

And..... It works!

Amiga Hello World [IMG]

I have to say I am quite excited to learn more and I am looking forward to learning more about C and about the Amiga!

Thanks for reading my blog :D Happy 2023!