Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucbvax!SUN.SOE.CLARKSON.EDU!nelson
From: nelson@SUN.SOE.CLARKSON.EDU (Russ Nelson)
Newsgroups: comp.sys.zenith.z100
Subject: RE: PDLIB, MASM problems
Message-ID: <8812020350.AA15522@sun.soe.clarkson.edu>
Date: 2 Dec 88 03:50:19 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: nelson@clutx.clarkson.edu
Organization: The Internet
Lines: 21

The .DEF files are probably considered to be part of the BIOS source.  Are
you really still using MASM 1.0?  Go buy a copy of Turbo Assembler.

But Gern had asked about fixing "bogus" phase errors.  Phase errors
are never bogus -- the assembler really is confused about where a
label should be placed.  The problem is that the assembler knows more
on the second pass than the first, and it will resize or change an
instruction based upon that information.  For example, if MASM decides
that a segment override is needed, it will insert one.  However, if
the symbol is undefined on the first pass, the segment override won't be
inserted.  Automatic phase error!

Rule one of MASM programming: always define your data first.  Rarely does
data need to be at the end of the program, and if it does, you probably
are going to refer to it as the base of an array rather than an actual
value.  But even if it does need to be at the end, you can slide things
around with careful use of segments and groups.

--russ (nelson@clutx [.bitnet | .clarkson.edu])
To surrender is to remain in the hands of barbarians for the rest of my life.
To fight is to leave my bones exposed in the desert waste.