Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!cornell!uw-beaver!microsoft!w-colinp From: w-colinp@microsoft.UUCP (Colin Plumb) Newsgroups: comp.sys.amiga Subject: Re: Problem with -b vs -b0 option on Lattice Keywords: Lattice V4.01 V5.00 GURU Message-ID: <96@microsoft.UUCP> Date: 17 Dec 88 09:31:51 GMT References: <29526@tut.cis.ohio-state.edu> <882@applix.UUCP> Reply-To: w-colinp@microsoft.UUCP (Colin Plumb) Distribution: na Organization: Microsoft Corp., Redmond WA Lines: 26 Confusion: Microsoft Corp., Redmond WA In article <882@applix.UUCP> scott@applix.UUCP (Scott Evernden) writes: |In article <29526@tut.cis.ohio-state.edu> erd@tut.cis.ohio-state.edu (Ethan R. Dicks) writes: |>struct ExecBase *ExecBase, **EBase; |> |>EBase = (struct ExecBase **) (4L); |>ExecBase = *Ebase; | | vs. | |> LEA $4, A0 |> MOVE (A0), A6 | |These don't say the same thing. Your C code suggests that location 4 |holds the address of a _pointer_ to ExecBase. This isn't so- location 4 |_is_ a pointer to ExecBase. | |Try: | | struct ExecBase *ExecBase = (struct ExecBase *) 4; Wrong! The *contents* of location 4 are a pointer to ExecBase, but "4", the number, is a pointer to a pointer to ExecBase. The original code is right. Yours says the ExecBase structure starts at address 4, which is not correct. -- -Colin (uunet!microsof!w-colinp)