News for hackers. Stuff that matters.
Re:The Amiga Demoscene Mixtape Vol. 1 [video] by 13of40 on Friday January 15, 2016 @11:40PM (#10914278)
I can't remember where I found the documentation for it, but I was able to do some pretty bad-ass stuff with a 68K assembler and an Amiga 1000. IIRC, there was a pointer at a well-known memory location that was the head of a linked list of all the OS libraries, so it was really easy to bootstrap to the point where you could set the screen mode and allocate some buffers for video memory, then you just drew on them like a canvas. The location of video memory was based on a not-quite-turing-complete "script" that the copper(?) chip read -- e.g. when a guru meditation error was showing at the top of the screen, the copper chip script was saying "start reading at 0x2222222 and when the raster gets to row 60 start reading at 0x4444444...". You could do freaky stuff with that script, like draw "pixels" of any of the 4096 possible colors, that would end up being about 8 real pixels wide by one high, which begat raster bars and blocky scrolling text. Ah, but nowadays you can't touch the bare metal, and there's nary an API that does anything but crash when you try to use it in an unintended way.
Re:The Amiga Demoscene Mixtape Vol. 1 [video] by Jupe on Friday January 15, 2016 @11:59PM (#10914315)
Yes, AbsExecBase, at 0x00000004 was the pointer to the exec library, from which you could get at anything on the Amiga. I still marvel at how everything was a linked list - quite a beautiful OS in some regards (if it wasn't for the lack of memory protection :(
Re:The Amiga Demoscene Mixtape Vol. 1 [video] by incepted on Saturday January 16, 2016 @12:51AM (#10914419)
Expanding on this a bit.

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".

Re:The Amiga Demoscene Mixtape Vol. 1 [video] by Flow on Saturday January 16, 2016 @12:27PM (#10915920)
exec.library is a great design. The way programs know nothing except for AbsExecBase, and it points to a table of function pointers of which you have the offsets of.

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.

Re:The Amiga Demoscene Mixtape Vol. 1 [video] by contingencies on Saturday January 16, 2016 @01:21AM (#10914502)
"... except for the problem of too many layers of indirection."