





						     Error Messages



		 A.1  Introduction

		 This  appendix	 lists	and  explains	the   error
		 messages  that	 can  be  generated  by	 the  Macro
		 Assembler, MASM, and the Linker LINK.


		 A.2  Macro Assembler Messages

		 This  section	lists  and  explains  the  messages
		 displayed  by	the  Macro  Assembler,	MASM.  MASM
		 displays a message whenever it	encounters an error
		 during	 processing.  It displays a warning message
		 whenever  it  encounters  questionable	  statement
		 syntax.

		 An end-of-assembly message is displayed at the	end
		 of  processing,  even	if no errors occurred.	The
		 message contains a count  of  errors  and  warning
		 messages  it  displayed  during the assembly.	The
		 message has the form

		      n	  Bytes	of symbol space	free
		      n	  Warning Errors      n	  Severe Errors


		 This message is also copied to	the source listing.

		 Error messages	are divided  into  two	categories:
		 assembler  errors and I/O handler errors.  In each
		 category, messages are	listed in  numerical  order
		 with a	short explanation where	necessary.

		 Assembler Errors

		 0: Block nesting error
		      Nested  procedures,   segments,	structures,
		      macros,  IRC,  IRP,  or REPT are not properly
		      terminated.  An  example	of  this  error	 is
		      closing  an outer	level of nesting with inner



								A-1


















	      XENIX Macro Assembler User's Guide



		   level(s) still open.

	      1: Extra characters on line
		   This	occurs when  sufficient	 information  to
		   define  the	instruction  directive	has been
		   received on a line and superfluous characters
		   beyond are received.

	      2: Register already defined
		   This	will only occur	 if  the  assembler  has
		   internal logic errors.

	      3: Unknown symbol	type
		   Symbol statement has	something  in  the  type
		   field that is unrecognizable.

	      4: Redefinition of symbol
		   This	error occurs on	pass  2	 and  succeeding
		   definitions of a symbol.

	      5: Symbol	is multi-defined
		   This	error occurs on	a symbol that  is  later
		   redefined.

	      6: Phase error between passes
		   The	 program   has	 ambiguous   instruction
		   directives  such that the location of a label
		   in the program changed in value between  pass
		   1 and pass 2	of the assembler.  An example of
		   this	is a forward reference coded  without  a
		   segment   override  where  one  is  required.
		   There would be an additional	byte  (the  code
		   segment override) generated in pass 2 causing
		   the next label to change.  You can use the /D
		   option   to	produce	 a  listing  to	 aid  in
		   resolving phase errors between  passes.   See
		   Chapter 2, ``MASM: A	Macro Assembler.''

	      7: Already had ELSE clause
		   Attempt to define an	ELSE  clause  within  an



	      A-2


















						     Error Messages



		      existing	ELSE  clause  (you cannot nest ELSE
		      without nesting IF...ENDIF).

		 8: Not	in conditional block
		      An ENDIF	or  ELSE  is  specified	 without  a
		      previous	 conditional   assembly	  directive
		      active.

		 9: Symbol not defined
		      A	symbol is used that has	no definition.

		 10: Syntax error
		      The syntax of the	statement  does	 not  match
		      any recognizable syntax.

		 11: Type illegal in context
		      The type	specified  is  of  an  unacceptable
		      size.

		 12: Should have been group name
		      Expecting	a group	name  but  something  other
		      than this	was given.

		 13: Must be declared in pass 1
		      An item was referenced before it was  defined
		      in  Pass	1.   For  example,  ``IF DEBUG'' is
		      illegal if DEBUG is not previously defined.

		 14: Symbol type usage illegal
		      Illegal use of a PUBLIC symbol.

		 15: Symbol already different kind
		      Attempt to define	a symbol differently from a
		      previous definition.

		 16: Symbol is reserved	word
		      Attempt to use  an  assembler  reserved  word
		      illegally.   For example,	to declare MOV as a
		      variable.



								A-3



















	      XENIX Macro Assembler User's Guide



	      17: Forward reference is illegal
		   Attempt to reference	something before  it  is
		   defined in pass 1.

	      18: Must be register
		   Register  expected	as   operand   but   you
		   furnished a symbol -- was not a register.

	      19: Wrong	type of	register
		   Directive or	instruction expected one type of
		   register,  but  another  was	 specified.  For
		   example, INC	CS.

	      20: Must be segment or group
		   Expecting segment or	group and something else
		   was specified.

	      21: Symbol has no	segment
		   Trying to use a variable with  SEG,	and  the
		   variable has	no known segment.

	      22: Must be symbol type
		   Must	 be  WORD,  DW,	 QW,  BYTE,  or	 TB  but
		   received something else.

	      23: Already defined locally
		   Tried to define a symbol as EXTERNAL	that had
		   already been	defined	locally.

	      24: Segment parameters are changed
		   List	 of  arguments	to  SEGMENT   were   not
		   identical  to the first time	this segment was
		   used.

	      25: Not proper align/combine type
		   SEGMENT parameters are incorrect.

	      26: Reference to mult defined
		   The instruction references something	that has
		   been	multi-defined.



	      A-4


















						     Error Messages



		 27: Operand was expected
		      Assembler	is  expecting  an  operand  but	 an
		      operator was received.

		 28: Operator was expected
		      Assembler	was expecting an  operator  but	 an
		      operand was received.

		 29: Division by 0 or overflow
		      An expression is	given  that  results  in  a
		      divide  by  0  or	a number larger	then can be
		      represented.

		 30: Shift count is negative
		      A	shift expression is generated that  results
		      in a negative shift count.

		 31: Operand types must	match
		      Assembler	gets different kinds  or  sizes	 of
		      arguments	 in  a	case where they	must match.
		      For example, MOV.

		 32: Illegal use of external
		      Use of an	external in  some  illegal  manner.
		      For  example, DB M DUP(?)	where M	is declared
		      external.

		 33: Must be record field name
		      Expecting	 a  record  field  name	  but	got
		      something	else.

		 34: Must be record or field name
		      Expecting	a record name  or  field  name	and
		      received something else.

		 35: Operand must have size
		      Expected operand to have a size, but  it	did
		      not.

		 36: Must be var, label	or constant



								A-5


















	      XENIX Macro Assembler User's Guide



		   Expecting a variable, label,	or constant  but
		   received something else.

	      37: Must be structure field name
		   Expecting a structure field name but	received
		   something else.

	      38: Left operand must have segment
		   Used	something in right operand that	required
		   a  segment in the left operand. (For	example,
		   ":.")

	      39: One operand must be const
		   This	 is  an	 illegal  use  of  the	addition
		   operator.

	      40: Operands must	be same	or 1 abs
		   Illegal use of the subtraction operator.

	      41: Normal type operand expected
		   Received STRUC, FIELDS, NAMES, BYTE,	WORD, or
		   DW when expecting a variable	label.

	      42: Constant was expected
		   Expecting a constant	 and  received	an  item
		   that	 does  not  evaluate to	a constant.  For
		   example, a variable name or external.

	      43: Operand must have segment
		   Illegal use of SEG directive.

	      44: Must be associated with data
		   Use of code related item where  data	 related
		   item	  was	expected.    For   example,  MOV
		   AX,<code-label>.

	      45: Must be associated with code
		   Use of data related item where code item  was
		   expected.



	      A-6



















						     Error Messages



		 46: Already have base register
		      Trying to	double base register.

		 47: Already have index	register
		      Trying to	double index address.

		 48: Must be index or base register
		      Instruction requires a base or index register
		      and  some	 other	register  was  specified in
		      square brackets, [ ].

		 49: Illegal use of register
		      Use of a register	with an	 instruction  where
		      there   is   no	8086  or  8088	instruction
		      possible.

		 50: Value is out of range
		      Value is too large  for  expected	 use.	For
		      example, MOV AL,5000.

		 51: Operand not in IP segment
		      Access of	operand	is impossible because it is
		      not in the current IP segment.

		 52: Improper operand type
		      Use of an	operand	such that the opcode cannot
		      be generated.

		 53: Relative jump out of range
		      Relative jumps must be within the	range  -128
		      to  +127	of the current instruction, and	the
		      specific jump is beyond this range.

		 54: Index displ. must be constant
		      Illegal use of index display.

		 55: Illegal register value
		      The register value  specified  does  not	fit
		      into  the	 "reg"	field (the value is greater
		      than 7).



								A-7


















	      XENIX Macro Assembler User's Guide



	      56: No immediate mode
		   Immediate mode specified or	an  opcode  that
		   cannot  accept  the	immediate.  For	example,
		   PUSH.

	      57: Illegal size for item
		   Size	of  referenced	item  is  illegal.   For
		   example, shift of a double word.

	      58: Byte register	is illegal
		   Use of one of the byte registers  in	 context
		   where  it  is  illegal.   For example, ``PUSH
		   AL,'' is illegal.

	      59: CS register illegal usage
		   Trying to use the CS	register illegally.  For
		   example, ``XCHG CS,AX,'' is illegal.

	      60: Must be AX or	AL
		   Specification of some register other	than  AX
		   or  AL  where only these are	acceptable.  For
		   example, the	IN instruction.

	      61: Improper use of segment reg
		   Specification of  a	segment	 register  where
		   this	 is  illegal.  For example, an immediate
		   move	to a segment register.

	      62: No or	unreachable CS
		   Trying  to  jump   to   a   label   that   is
		   unreachable.

	      63: Operand combination illegal
		   Specification of  a	two-operand  instruction
		   where the combination specified is illegal.

	      64: Near JMP/CALL	to different CS
		   Attempt to do  a  NEAR  jump	 or  call  to  a
		   location in a different CS ASSUME.



	      A-8



















						     Error Messages



		 65: Label can't have seg. override
		      Illegal use of segment override.

		 66: Must have opcode after prefix
		      Use  of  a  REPE,	 REPNE,	 REPZ,	 or   REPNZ
		      instructions  without  specifying	 any opcode
		      after it.

		 67: Can't override ES segment
		      Trying to	 override  the	ES  segment  in	 an
		      instruction where	this override is not legal.
		      For example, ``STOS DS:TARGET'' is illegal.

		 68: Can't reach with segment reg
		      There is no ASSUME that  makes  the  variable
		      reachable.

		 69: Must be in	segment	block
		      Attempt  to  generate  code  when	 not  in  a
		      segment.

		 70: Can't use EVEN on BYTE segment
		      Segment was declared to be byte  segment	and
		      attempt to use EVEN was made.

		 72: Illegal value for DUP count
		      DUP counts must be a constant that is  not  0
		      or negative.

		 73: Symbol already external
		      Attempt to define	a symbol as local  that	 is
		      already external.

		 74: DUP is too	large for linker
		      Nesting of DUPs was such	that  too  large  a
		      record was created for the linker.

		 75: Usage of ?	(indeterminate)	bad
		      Improper use of the "?".	For example, ?+5.



								A-9



















	      XENIX Macro Assembler User's Guide



	      76: More values than defined with
		   Too many initial values given when defining a
		   variable using a REC	or STRUC type.

	      77: Only initialize list legal
		   Attempt  to	use  STRUC  name  without  angle
		   brackets, < >.

	      78: Directive illegal in STRUC
		   All	statements  within  STRUC  blocks   must
		   either  be  comments	 preceded by a semicolon
		   (;),	or one of the Define directives.

	      79: Override with	DUP is illegal
		   In  a  STRUC	 initialization	 statement,  you
		   tried to use	DUP in an override.

	      80: Field	cannot be overridden
		   In  a  STRUC	 initialization	 statement,  you
		   tried  to give a value to a field that cannot
		   be overridden.

	      81: Override is of wrong type
		   In  a  STRUC	 initialization	 statement,  you
		   tried to use	the wrong size on override.  For
		   example, 'HELLO' for	DW field.

	      82: Register can't be forward ref

	      83: Circular chain of EQU	aliases
		   An alias EQU	eventually points to itself.

	      84: 8087 opcode can't be emulated
		   Either the 8087 opcode or  the  operands  you
		   used	 with it produce an instruction	that the
		   emulator cannot support.

	      85: End of file, no END directive
		   You forgot an end statement	or  there  is  a
		   nesting error.



	      A-10


















						     Error Messages



		 86: Data omitted with no segment

		 98: Override value is wrong length
		      There is an improper sized value in a  RECORD
		      or STRUC field.


		 A.3  Linker Messages

		 This section lists the	 error	messages  that	can
		 occur	when linking programs.	The messages are in
		 alphabetical order.

		 -A and	-F are mutually	exclusive
		      The  -A  and   -F	  switches   are   mutually
		      exclusive.

		 -u seen before	-n <num>
		      An undefined symbol has been given before	the
		      maximum	name-length  switch.   Reverse	the
		      order of the two switches.

		 <switch> ignored
		      You have given an	unrecognized switch.

		 Address missing
		      The -A switch is missing a following number.

		 Array element size mismatch
		      A	far communal array has been  declared  with
		      two  or  more  different	array element sizes
		      (e.g.,  declared	once   as   an	 array	 of
		      characters  and  once  as	an array of reals).
		      NOTE: At the present  time,  communal  arrays
		      are not available	in MASM.

		 Attempt to access data	outside	segment	bounds
		      An LEDATA	or an LIDATA record specifies bytes
		      that  occupy  offsets  beyond  the end of	the
		      segment  as  defined  by	the   corresponding



							       A-11


















	      XENIX Macro Assembler User's Guide



		   SEGDEF  record.   It	is hard	for you	to cause
		   this	message; usually, it indicates a bug  in
		   the compiler	or assembler.

	      Attempt to put segment name in more than one group
	      in file filename
		   A segment was declared to be	a member of  two
		   different  groups.	Correct	 the  source and
		   recreate the	object files.

	      Cannot create list file
		   The linker was  unable  to  create  the  list
		   (map)   file.    Possibly  you  do  not  have
		   permission, or the disk is full.

	      Cannot find file
		   You	are  specifying	 an  object  module   or
		   library  file which the linker cannot find or
		   is noot able	to open	for reading.

	      Cannot open run file
		   The directory or disk is full, or  you  don't
		   have	the right permissions. Make space on the
		   disk	 or  in	  the	directory,   or	  change
		   permissions.

	      Cannot open temporary file
		   The directory or disk is full.  Make	space on
		   the disk or in the directory.

	      Common area longer than 65536 bytes
		   Your	program	has more than  64K  of	communal
		   variables.	NOTE:  At the present time, only
		   Microsoft C programs	can possibly cause  this
		   message to be displayed.

	      Data record too large
		   LEDATA record (in an	object module)	contains
		   more	 than  1024  bytes  of	data.  This is a
		   translator  error.	 Note	the   translator



	      A-12


















						     Error Messages



		      (compiler	 or  assembler)	 that  produced	the
		      incorrect	object module and the circumstances
		      under  which  it was produced, and report	the
		      information to Microsoft.

		 Dup record too	large
		      LIDATA record (in	an object module)  contains
		      more than	512 bytes of data.  Most likely, an
		      assembly module contains a  struc	 definition
		      that  is	very complex, or a series of deeply
		      nested  DUP  statements  (e.g.  ARRAY  db	 10
		      dup(11   dup   (12  dup  (13  dup	 (...))))).
		      Simplify and reassemble.

		 Error accessing library
		      The linker was unable  to	 open  a  specified
		      library.	 Make  sure the	file exists and	has
		      the proper permissions.

		 Fixup	overflow  near	num  in	 segment  name	 in
		 filename(name)	offset num
		      Some possible causes  are:  1)   A  group	 is
		      larger   than  64K  bytes,  2)  your  program
		      contains	an  intersegment  short	  jump	 or
		      intersegment  short call,	3) your	have a data
		      item whose name  conflicts  with	that  of  a
		      subroutine in a library included in the link,
		      and 4) you have an EXTRN	declaration  inside
		      the body of a segment, for example:













							       A-13



















	      XENIX Macro Assembler User's Guide



	      CODE    segment public 'code'
	      extrn   main:far
	      start   proc    far
		      call    main
		      ret
	      start   endp
	      CODE    ends


		   The following construction is preferred:

	      extrn   main:far
	      CODE    segment public 'code'
	      start   proc    far
		      call    main
		      ret
	      start   endp
	      CODE    ends


		   Revise the source  and  recreate  the  object
		   file.

	      Group <name> larger than 64Kbytes
		   A group has been defined that is larger  than
		   the	maximum	 allowed for a physical	segment.
		   Reduce the size of the group.

	      Invalid object module
		   One of the object modules  is  invalid.   Try
		   recompiling.	  If the error persists, contact
		   Microsoft.

	      List file	name missing
		   The -m switch is missing a following	string.

	      Multiple code segments --	should be medium model
		   There is more than one code segment	and  the
		   -Mm,	 -M1, or -Me switch was	not given.  Make
		   sure	all modules have the same  memory  model



	      A-14


















						     Error Messages



		      or link with the -Me switch.  Not	Fatal.

		 Multiple data segments	-- should be large model
		      There is more than one code segment  and	the
		      -Mm,  -M1, or -Me	switch was not given.  Make
		      sure all modules have the	same  memory  model
		      or link with the -Me switch.  Not	Fatal.

		 Name length missing
		      The -n switch is missing a following number.

		 NEAR/HUGE conflict
		      Conflicting near and huge	definitions  for  a
		      communal	variable.   NOTE:  At  the  present
		      time, communal variables are not available in
		      MASM.

		 No scratch file
		      Internal or system error.	 Do a  file  system
		      check,  and  if  the  error  persists  notify
		      Microsoft.

		 Number	missing
		      The -S switch is missing a following number.

		 Object	not found
		      See "Cannot find file".

		 Out of	space on list file
		      Disk on which list file is being	written	 is
		      full.   Free  more  space	on the disk and	try
		      again.

		 Out of	space on run file
		      Disk  on	which  executable  file	 is   being
		      written is full.	Free more space	on the disk
		      and try again.





							       A-15



















	      XENIX Macro Assembler User's Guide



	      Run file name missing
		   The -o switch is missing a following	string.

	      Segment limit too	high
		   There is insufficient memory	for  the  linker
		   to  allocate	tables to describe the number of
		   segments   requested	  (either   the	   value
		   specified  with  /SEGMENTS  or  the	default:
		   128).   Either  try	the  link  again   using
		   /SEGMENTS  to  select  a  smaller  number  of
		   segments (e.g. 64, if the default  were  used
		   previously) or  free	some memory.

	      Segment size exceeds 64K
		   You have a small model program with more than
		   64Kbytes  of	code, or you have a middle model
		   program with	more than 64Kbytes of data.  Try
		   compiling and linking middle	or large model.

	      Symbol already defined: <symbol>
		   A public symbol has been  defined  more  than
		   once.

	      Symbol missing
		   The -u switch is missing a following	string.

	      Symbol table overflow
		   Your	 program  has  greater	than   256K   of
		   symbolic    information   (Publics,	 extrns,
		   segments,  groups,  classes,	  files,   etc).
		   Combine  modules and/or segments and	recreate
		   the object files.  Eliminate	as  many  public
		   symbols as possible.

	      Terminated by user
		   You entered an interrupt.

	      Too many external	symbols	in one module
		   Your	object module specified	 more  than  the
		   allowed number of external symbols.	Break up



	      A-16


















						     Error Messages



		      the module.

		 Too many group-, segment-, and	class-names in	one
		 module
		      Your  program  contains	too   many   group,
		      segment,	and class names.  Reduce the number
		      of  groups,   segments,	or   classes	and
		      recreate the object files.

		 Too many groups
		      Your program defines more	than  nine  groups.
		      Reduce the number	of groups.

		 Too many GRPDEFs in one module
		      LINK encountered more than  9  GRPDEFs  in  a
		      single  module.  Reduce the number of GRPDEFs
		      or split up the module.

		 Too many libraries
		      You  tried  to  link  with   more	  than	 16
		      libraries.  Combine libraries or link modules
		      that require fewer libraries.

		 Too many segments
		      Your program has too many	 segments.   Relink
		      using  the  -S  switch  with  an	appropriate
		      number of	segments specified.

		 Too many segments in one module
		      Your  object  module  has	  more	 than	255
		      segments.	   Split  the  modules	or  combine
		      segments.

		 Too many TYPDEFs
		      An object	 module	 contains  to  many  TYPDEF
		      records.	 These	records	 are  emitted  by a
		      compiler	to  describe  communal	 variables.
		      NOTE: At the present time, communal variables
		      are not available	in MASM.



							       A-17



















	      XENIX Macro Assembler User's Guide



	      Unexpected end-of-file on	scratch	file
		   The temporary scratch file has probably  been
		   removed.  Restart linker.

	      Unknown model specifier <-M?>
		   The -M switch  was  given  with  a  character
		   following  that  was	not equal to s,	m, l, or
		   e.

	      Unrecognized Xenix version number
		   The version number following	 the  -v  switch
		   must	currently be either 2 or 3.

	      Use -i switch
		   There  is  more  than  one  segment	and  the
		   program  is being linked impure, i.e. WITHOUT
		   THE -i switch.  Impure executables  can  only
		   have	one segment.

	      Version number missing
		   You gave the	 -v  switch  without  a	 version
		   number following.

	      Warning: _.SYMDEF	out of date in <library	name>
		   A library archive (.a) file has been	modified
		   since   the	last  time  its	 dictionary  was
		   updated with	ranlib.	 Re-ranlib the file.

		   If you install  new	libraries  with	 the  cp
		   command  you	 may see this error message when
		   in fact the library is up-to-date.	This  is
		   because cp makes the	modification time of the
		   new library equal to	the time the library was
		   copied   and	 the  dictionary  time	is  left
		   unchanged.  To avoid	this  situation,  always
		   copy	libraries with "copy -m" or extract them
		   from	tar-format archive files.





	      A-18



















						     Error Messages



		 Warning: Groups <name1> and <name2> overlap
		      Input to the linker has established a segment
		      ordering	such  that the first segment of	one
		      group is ordered before the last	segment	 of
		      the   previous  group.   Change  the  segment
		      ordering or redefine appropriate class names.

		 Warning: model	mismatch
		      You are linking object modules with different
		      memory models.  Recompile	so all modules have
		      the same model, or else use the -Me switch.

		 Warning: too many public symbols
		      You have asked for a sorted listing of public
		      symbols  in  the list file, but there are	too
		      many  symbols  to	 sort.	 The  linker   will
		      produce  an  unsorted  listing  of the public
		      symbols.
























							       A-19























	      Appendix A


	      Error Messages
	      __________________________________________________



	      A.1  Introduction	 A-1

	      A.2  Macro Assembler Messages  A-1

	      A.3  Linker Messages  A-11











































