Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ulowell!m2c!applix!scott From: scott@applix.UUCP (Scott Evernden) Newsgroups: comp.sys.amiga Subject: Re: Problem with -b vs -b0 option on Lattice Keywords: Lattice V4.01 V5.00 GURU Message-ID: <886@applix.UUCP> Date: 19 Dec 88 19:40:25 GMT References: <29526@tut.cis.ohio-state.edu> <882@applix.UUCP> <96@microsoft.UUCP> Reply-To: scott@applix.UUCP (Scott Evernden) Distribution: na Organization: APPLiX Inc., Westboro MA Lines: 29 In article <96@microsoft.UUCP> w-colinp@microsoft.UUCP (Colin Plumb) writes: >In article <882@applix.UUCP> scott@applix.UUCP (Scott Evernden) writes: >|> >|>EBase = (struct ExecBase **) (4L); >|>ExecBase = *Ebase; >| vs. >|> LEA $4, A0 >|> MOVE (A0), A6 >|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. Of course you are correct. I think I meant something more like: struct ExecBase *ExecBase = * (struct ExecBase **) 4; but couldn't manage to spit it out on a Friday night. This is exactly equivalent to what Ethan had originally, so... never mind... -scott