Path: utzoo!attcan!uunet!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: LoadSeg() problems Message-ID: <10695@cbmvax.commodore.com> Date: 7 Apr 90 05:07:55 GMT References: <15113@phoenix.Princeton.EDU> Reply-To: valentin@cbmvax (Valentin Pepelea) Distribution: comp.amiga.tech Organization: Commodore, West Chester, PA Lines: 26 In article <15113@phoenix.Princeton.EDU> pfalstad@phoenix.Princeton.EDU (Paul John Falstad) writes: > >I'm having trouble with the LoadSeg() function call. Whenever I call it, >it loads the specified segment except for one thing: the first word is >written over with what seems to be garbage. At the start of one program, >for example, I have the code 0x6040 0x487a, a bsr instruction, I thing. >When I try to execute the code, however, I get a 0x4afc 0x487a. The garbage >word is always 0x4afc. Does this number look familiar to anyone? Does it >have some mystical meaning in AmigaDOS? Has anyone had a similar problem? >Help! > >pfalstad@phoenix.princeton.edu When asking such questions, please include the part of the source code in question. One thing you must remember here is that some pointers provided to the LoadSeg() function are BCPL pointers, called BPTR's. If these pointers do not point to long-word aligned buffers, then the first word of your buffer risks getting overwritten. Valentin -- The Goddess of democracy? "The tyrants Name: Valentin Pepelea may distroy a statue, but they cannot Phone: (215) 431-9327 kill a god." UseNet: cbmvax!valentin@uunet.uu.net - Ancient Chinese Proverb Claimer: I not Commodore spokesman be