Ah, the bad old days, before Linux, when a hacker who really wanted to get into the guts of a system had to reverse-engineer it. I had an Amiga and the operating system was in my opinion the best available on a consumer microcomputer at the time, but I didn't like it that much. It had a byzantine command syntax and internal architecture, and the slightest application bug could crash the whole computer because there was no memory protection of any kind.
But it had a good CPU, it multitasked, you could get decent shells and C compilers for it, it used proper path names (with forward slashes) and newlines (without the extra carriage returns) and filenames (lowercase and free format). Just too bad it wasn't more like Unix.
Anyway. In 1989 I knew I'd be writing my own SCSI device driver sooner or later, and, to really get a feel for what was going on, I started to disassemble the OS kernel (known as the "exec") to see how the I/O functions worked. That was pretty interesting - I had just taken a real time OS course at university, and here was a real live one to take apart - so I ended up disassembling the entire exec.
Once that was done, I knew I wanted to share it around, but I figured I'd get in trouble if I started distributing the exec code. So I hacked up an elaborate scheme that forced an end user to run a program and construct the disassembly using data from his own machine's ROM. This way I was distributing no code that I wasn't supposed to.
Fast forward fourteen years, and this stuff is now strictly of historical interest, so I think it's reasonable to post the disassembly intact. If the legal holder of the copyright should happen to disagree, would they please contact me and I will take the material offline immediately. So here it is:
The entire AmigaOS 1.2 Exec, disassembled and commented.
While I'm at it, some other stuff that might be of historical interest. Right after I got the machine, I got hit by a boot sector virus. This caused me anguish, because I'd paid a lot of money for the machine secondhand, and it seemed to be defective, being prone to random crashes. It was a virus. Well, I just had to see how that worked.
An old Amiga boot sector virus, disassembled and commented.
Later, Commodore's "recoverable RAM disk" appeared, and it could survive a hard reset of the machine, just like a virus. I had to see how that worked.
ramdrive.device, disassembled and (partly) commented.
Did I mention 'byzantine' in my description of AmigaDOS's internal workings? You could just write C programs, and let the C compiler's library hide the horrors of the API from you, but I wanted to know what was really going on, so I disassembled the simplest native CLI program:
AmigaDOS 'echo' command, disassembled and commented.
Finally, one more thing. After I had learned how the Amiga OS really worked, and written device drivers for the hard disk and tape drive on my homebrew SCSI interface, some other Amiga enthusiasts at work wanted a tutorial. So I wrote them one.
Amiga Device Driver Tutorial
If all this is actually interesting to you, you may want to see some of the Amiga code I wrote.
This concludes today's nostalgia trip into ancient history. Unlike a lot of folks, I accept that the Amiga is dead and this stuff is of historical interest only! For the past four years, and hopefully for many more, my Linux system has been everything that I ever hoped for in a home computer.
Back to my miscellaneous technical stuff page