So on my last adventure through some disk corruption on my Amiga, the natural thing to do is find some kind of MD5 checksum program to then compare signatures of files being copies to ensure that they are being copied correctly.
While there were several great C compilers for the Amiga when it was a viable platform, the one left standing today is GCC. Â Which is fine and all, but it is rather large, andÂ unwieldy. Â And won’t run on a computer with 2MB of RAM (In the off chance that I want to run it on the 600). Â But that is when I found out that the source codeÂ (dice.com has moved!) Â to old DICE compiler is available! Â DICE, was originally a public domain compiler then turned commercial then finally turned freeware. Â For its time it was thought as a highly capable compiler as reviewedÂ here. Also of note is that is was written byÂ Â Matt Dillon, who later went on to DragonFLY BSD fame.
So I thought I’d try somethingÂ completelyÂ different.
So after extracting the 3.15 binary distribution (which also included cross compiling from linux/i386), and following the install notes I tried to build a md5 program that I had found into an AmigaDOS binary. Â And it didn’t work. Â It turns out that it is missing include files related to AmigaDOS. Â And I was further unable to build DICE C from within DICE C.
So after a lot of searching, I came across this, a cut down “Mini DICE” that was bundled with Amiga Shopper, meaning it has the following limitations:
- Only small library modules are included.
- No Bitfields
- No floating point
- No pragmas
- No register variables/arguments
- The maximun executable program size is 40K
- Each source file can only have up to 4 procedures
Wow that is.. limiting. Â But it does have several of the needed include files, and a nice setup program to get going. Â At first I tried doing aÂ full-saleÂ overlay of the ‘3.15 binary’ version but I broke something to do with REXX and how DICE links. Â So instead I justÂ overlaidÂ the core compiler, namely dcc, dc1, dccp, das, dlink, dmake, fdtolib & fdtopragma.
I was then finally able to compile md5. Â I went ahead and started to build some of the source, and so far using a combination of dmake & vmake I was able to rebuild das, dcc, dlink, dc1 and dccp. Â I went ahead and created backups of my somewhat improved dice, and dice with source code. Â Some programs build fine from the command line, others you need to invoke the visual build tool.
So how is the environment? Â I tried to build DungeonÂ (dung27s.zip) for the heck of it, but the visual makefile tool couldn’t handle a project with 33 files. Â I suppose I could have made a library and gone through with some linking hell but that seemed like work. Â Instead I just typed in all the C files from the command line, and compiled it that way. Â Taking care of a warning and a few errors and I actually got a binary!
Even better, it runs!