Re: A83: rom redundancy


[Prev][Next][Index][Thread]

Re: A83: rom redundancy






In accordance with the prophecy, AutismUK@aol.com uttered:

> If you didn't have a vector table then the routine would have to be at $268 ;
> if you wanted the preceding routine to be two bytes longer you'd then have
> mayhem.
> 
> For an extreme example, look at the Amiga.
> 

eh... bZZZZZZZZt! You just hurt my feelings. :-P

Allow me to explain a bit about Amiga and absolute addresses. In AmigaOS
(which has one big drawback, and that is that there's no memory protection,
just one big chunk of globally accessible memory), there is ONE absolute
address, and it's $4. At $4 you will find a longword (32 bits) which is the
address of execbase, the memory location of the exec library. Going backwards
from this address, you'll find vectors leading to the different functions in
the exec library, in the form of JMP instructions.

So this is a jump table, just like in TI-OS, but you don't even know the
addresses of the JMPs, you need to get a pointer to them first. Then, to do
various stuff, you need to open other libraries with the OpenLibrary() call
from the exec library jump table. OpenLibrary(), after possibly loading a
library file from disk, will return a pointer to a new jump table, from which
you jump to the various system routines you wish to use.

So this is no mayhem. This is a very neat solution for a non-memory-mapped
system.

Linus
============================================================================
                   A fool and his money are soon partying.
============================================================================
lairfight@softhome.net, visit http://linusworld.cjb.net (PGP key available).




References: