| Nitpick away, always glad to include corrections! > LZX had supplanted LHA already by 1994. True, but LHA always felt like more of the standard and tools were readily available and present on most systems. Sort of like how Bzip2/XZ and so on are technically far superior, yet a gzipped tarball is still the universal standard on Unix systems. A quick glance through AmiNet shows the majority of packages there are still using LHA as standard. Even stuff targetting a "modern" Amiga tends to use LHA - grepping the Os4Depot full package list shows: grep -c '.lha' FULLINDEX.readme
4110
grep -c '.lzx' FULLINDEX.readme
37
> For all practical accounts of programming the CPU it's a 32-bit machineTrue. I'll update the article to include that - I guess I'm really thinking of things like the 68020 processor (and CD32 which proudly proclaimed "32-BIT" in big letters on the case :) > You're in no way locked to program for AmigaOS in C. Also true. From what I can see, calling & opening the libraries from Assembly is remarkably similar to e.g. C, but from browsing the leaked OS source (not that I'd ever advocate for that sort of thing ;) ) it was all originally in C. I wanted to dive in and get a better understanding of the code as it was originally written hence my experiments targeting C. Plus, I knew enough C from my old University days to get up to speed in a short enough timespan. With no memory protection, crashing my Amiga because I forgot to free some DOS object or other was a common occurrence - if I was attempting this in Assembly, I'd probably still be working on a basic proof-of-concept! Although I really admire the skills of those developers who did choose that language to write system utilities, not to mention the magic of the demo-scene. It's just a bit beyond my abilities/time constraints at the moment! |
EDIT: To those unfamiliar, which I'm guessing is most people here, BPTR's are regular pointers shifted two bits down... BSTR's are BPTR's to a BCPL string, more commonly known as a "Pascal string" (single byte length as the first byte).
The reasoning for this is language simplicity (too much... I hate it, to be clear):
What in C would be array[index] is famously pretty much syntactic sugar for *(array + index). In BCPL it's !(array+index) or array!index. But whereas C is typed enough that C knows that (array + index) requires scaling index to the size of the elements of the array, BCPL is type-less. So if "index" is 1, array + index will add 1 to the address even if "array" holds 32 bit values.
Since every value is typically the size of a pointer (otherwise the typeless goes straight out the window), on M68k the elements are 4 bytes.
So to make (array + index) work, pointers needs to be left-shifted two bits. Then you can right-shift them two bits for any operations explicitly treating them as pointers (like "!")...
And then everyone having to ever interface with your code from any other language will hate you for all time.