Everything was relative on the Amiga. The only thing absolute was AbsExecBase at 0x4. You get a pointer to this library and then, from there, you can locate more libraries by calling FindLibrary() (or something like that).
AbsExecBase is the ultimate proof of the old adage "Any problem in computer science can be solved with an additional layer of indirection".
In a sense it was a Component Object Model(COM) like the one in Windows. You call exec->OpenLibrary("name of lib", version_of_lib) and it returns a pointer to a table of function pointers of which you know the offsets of. It could even handle multiple versions of a library in principle. In reality makers of libraries just made sure the function table was the same, and added new stuff at the end.
You have to call CloseLibrary(libptr) to release the instance. Pretty similar to Objective-C's and COM's release().
OpenLibrary was allowed to return a different pointer for each call, but the early exec.library did not do this AFAIK.
Great design really. And how signals and message system works is just beautiful as well. I really get why Matt Dillon(of FreeBSD and DragonflyBSD) wanted something similar in the BSD kernel.
I still have the Amiga Kernel Reference Manual for exec in my shelf.
Boy, I miss those days :(
I've tried several times to make a tiny kernel for x86, but always feel it's either too old interfaces like the PIC, TIMER, VGA, IDE etc, or chip specific. I can't give my friend a bootable USB because he/she might have a different hardware setup.
Plus using BBSs implied buying a modem and paying for long distance phone calls. Both completely out of my parents' budget.
It was no secret people were looking at each other's code. Reviewing the code was a way to learn about how to implement demo routines. But it was also a practical way to learn about programming the machine itself. Things you will not find in any manual.
I was not making a claim about licensing. Perhaps you are not familiar with the notion of a metaphor.
Just shipping a binary that happens to be very close to the language used to write that program wouldn't qualify as open source (and it would still be missing a lot of useful information, such as loop labels, memory location names, etc...).
But the demo scene was anti-commercial in nature. The creators gave their demos away in good will. Nobody cared if their work was reused unless it was a blatant rip-off or was used for commercial gain. And disassembly was standard operating procedure to hack on the source code.
So there was some sort of ethos at work, which seemed to arise naturally and spontaneously. And it reminds me of the open source spirit.
> it would still be missing a lot of useful information, such as loop labels, memory location names, etc...
I agree the disassembled code would be missing these things. But they are only conveniences for an assembly programmer.
There is almost 1:1 correspondence between assembly code and machine code, which makes the task a lot easier than disassembling optimized C code for example.
And on a practical level, the lack of labels and names doesn't stop you doing what you want with the code.
For example the IDE used in the Scoopex tutorial above is ASM-One by TFA. But TFA are not the original author. ASM-One was a commercial product. And TFA added some very useful extensions despite not having the source code!
I have used quite a few Amiga music trackers over the years. But they all descended from the disassembled code of Karsten Obarski's abandoned Ultimate Soundtracker [1]. The lack of assembly code was never a practical problem.
I would have killed for this back when I had an A500. It seemed like dark magic and all I could find was a book on ASM game programming tricks, which was too advanced for me.