Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!amdcad!tim From: tim@amdcad.UUCP Newsgroups: comp.sys.amiga Subject: Re: PD Assembler;Label errors! Message-ID: <15033@amdcad.UUCP> Date: Mon, 2-Mar-87 11:32:45 EST Article-I.D.: amdcad.15033 Posted: Mon Mar 2 11:32:45 1987 Date-Received: Tue, 3-Mar-87 20:51:43 EST References: <859@crash.CTS.COM> Reply-To: tim@amdcad.UUCP (Tim Olson) Organization: Advanced Micro Devices, Sunnyvale, California Lines: 36 In article <859@crash.CTS.COM> billk@pnet01.CTS.COM (Bill Kelly) writes: > >LabelOne: movea.l #4,a0 > movea.l (a0),a0 > bra LabelTwo > >LabelTwo move.l a0,_ExecBase ; colon on label name > beq NoExec ; purposely omitted > > NoExec: rts > >...this code is the kind of stuff I was writing to try to determine what in my >LARGE file had caused the errors. In a file as small as the one above, the >same problems would occur. Whenever I define *any* label, I get: > >***** 45 Label value changed between passes. The MC68020 User's Manual states " Note: A short branch to the immediately following instruction cannot be generated, because it would result in a zero offset, which forces a word branch instruction definition." The assembler assumes in pass 1 that the displacement of the branch label can fit in an 8-bit field, and doesn't know the actual displacement until the end of pass1 (since it is a forward reference). Then in pass2, it discovers that the branch matches the above condition, and changes the displacement size to 16-bits. This causes further labels to now be off by 1 byte from pass1 to pass2, hence the error message you see. You will somehow have to force the branch to use the 16-bit displacement mode in pass1 (sorry, I don't know the syntax for your assembler.) -- Tim Olson Advanced Micro Devices tim@amdcad