Path: utzoo!utgpu!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!POSTGRES.BERKELEY.EDU!dillon From: dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga.tech Subject: Re: ExecBase Message-ID: <8905242209.AA20811@postgres.Berkeley.EDU> Date: 24 May 89 22:09:13 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 46 :In article <31472@sri-unix.SRI.COM>, thomas@cbmvax.UUCP (Dave Thomas QA) :writes: :> In article <10702@cit-vax.Caltech.Edu> bdiscoe@tybalt.caltech.edu.UUCP :> (Ben W. Discoe) writes: :>> :>> I'm trying to find Execbase. I seem to remember reading somewhere that :>> it's always at 0000004 in memory, but it doesn't seem to be there, and :>> I can't find my reference any more. Could anyone tell me where it is or :>> how to find it? As people have already noted, the pointer to ExecBase can be found at location 4. assembly: move.l 4,A6 C: SysBase = *(struct ExecBase **)4; I strongly suggest though that people who write programs or assembly routines NOT always get execbase from location 4. The reason is simply that from what I can tell location 4 is in CHIP memory and thus subject to fetch delays when one is in a high bandwidth video mode. The proper way to access the execbase is to assign it to a variable at program startup/init and then reference it from the variable. For example, one always references 'SysBase' from C... the C startup module always does a 'move.l 4,_SysBase'. Since SysBase will be in FAST memory if the machine has fast memory, the processor will never freeze trying to access it no matter what video mode you are in. The people at C-A have been moving towards getting as much stuff out of CHIP memory as possible in hopes of eventually making CHIP memory DMA-only memory for the custom chips, thus making all programs run much faster in the higher video modes. The main problem is that currently the exec library vectors are created before fast memory is turned on and thus usually gets put into CHIP memory.... the infamous location $676 (p.s. NEVER EVER assume ExecBase is at $676!). Also: The 68010 and beyond allow you to change the vector base and this most certainly will be implemented in a future release so the interrupt vectors can be moved out of CHIP memory. This is one reason why serial at high baud rates currently goes to hell when you are in HAM or 640xNx4 mode. -Matt