Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU.UUCP Newsgroups: comp.sys.amiga Subject: Re: PD Assembler;Label errors! Message-ID: <8703021853.AA28960@cory.Berkeley.EDU> Date: Mon, 2-Mar-87 13:53:15 EST Article-I.D.: cory.8703021853.AA28960 Posted: Mon Mar 2 13:53:15 1987 Date-Received: Tue, 3-Mar-87 22:30:26 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 30 This is what is known as a phase error. Somewhere in your code the assembler assumed an instruction was a certain size and then in pass2 found that it was actually larger. Usually, the instruction in question is a FORWARD branch. Since the destination label isn't defined yet, the assembler assumes the branch can be done with an 8 bit displacement. When pass2 rolls around, BOOM, the forward branch suddenly becomes a 16 bit displacement (assuming the label is sufficiently far away) and you get a phase error. The phase error is usually detected in pass2 when a program label's address is found to be different than in pass1. -Matt 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.