We will be using a C compiler called “vbcc” which is an amazingly flexible compiler running on multiple host systems and being able to build executable programs for multiple “target” systems. It does this by being broken into two sections, a “front-end” section handles basic compilation on the host, and a “back-end” section is used for the CPU/architecture and platform of the target to generate the correct program code and file format.
First we pull the front-end out of the LhA format archive. If the AmigaShell is not still open from the last post, open it and type “cd t:” before the below, which will take quite a bit longer than previous uses of the “lha” command.
lha x dh1:vbcc_bin_amigaos68k
Now a fun venture into the Amiga Workbench GUI to install it.
Push the AmigaShell “back” by clicking on the icon at the top right of the AmigaShell window. This will either bring a window to the front, or if it is at the front it will push the window to the back. This will allow you access to the Workbench window while keeping AmigaShell open. Most systems your “desktop” always sits behind all other Windows, but on the Amiga it is just another window. Very handy.
Double click on the Ram Disk icon and you will see… nothing… Here’s another facet of the Amiga. By default the Workbench GUI will only show items that have an icon “attached” to them. On the Amiga icons are files with names like “something.info” and are a rare instance of the system using file extensions. You should tell Workbench to show everything by using the right mouse button to access the menu, and select Window > Show > All Files.
You should see a number of drawers (should be three) including one called “T” which is where we’ve been working, so double click on the “T” drawer.
In all likelihood you will see an “empty” window but the scroll bars will indicate the contents is larger than the window. We could scroll but we will use a keyboard shortcut, Right Amiga + ‘.’ but being an emulation we translate this to holding the Page Down key and pressing the full stop (period) key. This re-arranges or “cleans up” the icons in the window (temporarily), and in this case revealing a drawer called “vbcc_bin_amigaos68k”.
Double click on this drawer and then on the “Install” icon.
For the most part we can leave any and all options to their defaults, such as selecting “Intermediate User”.
When it comes to “selecting a drawer” to install the software we want to select the “root” level of the second partition of our hard drive. Installing to the first “Workbench” partition would take too much space. Using the “Show Drives” button is useful as then we just need to click on the “HD1: Work:” entry in the list.
When the installer is complete either pull AmigaShell forward or push Workbench (and any other windows) back, either method is equally valid.
The installer referenced a “user startup file” so let’s look. Show the contents of the Amiga’s “scripts” directory.
dir s:
You will see a file “User-Startup” that has been created. At first this file does not exist and the “Startup-Sequence” controls the Amiga boot process alone. This file detects the presence of “User-Startup” and executes it at boot time if found. Ideally you should never need to edit the “Startup-Sequence” file. Let’s take a look at the new file.
type s:user-startup
See how there are some “assign” commands and a “setenv” command? This is fairly typical of Amiga hard drive installed software.
We’re done with the C compiler front-end installer so let’s clean up.
delete #? all
Before we install the “back end” we need to have the NDK available. This is where our usual process breaks down as the “3.9” NDK we are using is so big. You may also find it useful to have some of the files available “outside” of the Amiga so we will work directly on the “XFER” area.
cd dh1: lha x NDK39 copy NDK_3.9 hd1:NDK39 all cd t:
The extraction and copy operations here will take a (very) long time to complete, but the end result will be your host system and Amiga will each have access to the NDK files.
There are a bunch of issues with the assembler includes, like dos/dos_lib.i missing all the functions from V36 onwards (so stops at 1.3 DOS calls), but complete-ndk39 can be a useful reference. To be fair the original “Commodore-Amiga Inc” includes had the same problem. Have looked at the Hyperion release of the “3.2” NDK and the same problems continue with the assembler includes.
Now we can work to install the “backend” of the C compiler, starting with extracting the archive.
lha x dh1:vbcc_target_m68k-amiga
Follow the same process as the front-end to run the graphical installer found under Ram Disk, the “T” drawer, etc.
It will ask for the location of the system header. The path should be
Work:NDK39/Include/include_h
After installation switch back to the AmigaShell and clean up as usual.
delete #? all
This concludes the installation of the C compiler we will be using. We will be finishing installing and configuring tools and testing them next time.