Foreword

This manual describes several utility programs that aid programmers and system designers in
the software development process. Collectively, these utilities allow you to assemble 8086
assembly language modules, link them together to form a program that runs, and generate a
cross-reference map of the variables used in a program. You can also use these utilities to
create and manage your own libraries of subroutines and program modules, as well as create
large programs by breaking them into separate overlays.

The Programmer's Utilities Guide assumes that you are familiar with the DOS operating
system environment. It also assumes that you are familiar with the basic elements of 8086
assembly language programming.

RASM-86 is an assembler that translates 8086 assembly language statements into a
relocatable object file in the Intel (r) format. RASM-86 facilities include assembly of Intel
8086 mnemonics, assembly-time expressions, conditional assembly, page formatting of listing
files, and powerful code-macro capabilities.

Section 1 describes the overall operation of RASM-86 and its optional run-time parameters.
Section 2 describes elements of RASM-86 assembly language, including the character set,
delimiters, constants, identifiers, operators, expressions, and statements.

Section 3 describes the various RASM-86 directives that control the assembly process.
Section 4 contains a brief description of the RASM-86 instructions for data transfer,
mathematical operations, string manipulation, control transfer, and processor control. Section
5 describes the code-macro facilities of RASM-86.

Section 6 describes XREF-86 , an assembly language crossreference program used with
RASM-86. Section 7 describes LINK-86 TM , the linkage editor that combines relocatable
object modules into an absolute file that runs under DOS. Section 8 explains how to use LIB
86Tm , the software librarian that creates and manages libraries.

The appendixes contain a complete list of error messages output by each of the utility
programs.
Table of Coiltents

1 introduction to RASK-86

1.1 Assembler Operation . . . . . . .

1.2 Invoking RASM-86 . . . . . . . . . . .

1.3 Optional Run-time Parameters

2 Elments of RASM-86 Asambly Languag*

2.1 RASM-86 Character Set . . . . . . . . . . . . . . . 2-1

2.2 Tokens and Separators . . . . . . . . . . . . . . . 2-1

2.3 Delimiters . . . . . . . . . . . . . . . . . . . . 2-1

2.4 Constants . . . . . . . . . . . . . . . . . . . . . 2-3

2.4.1 Numeric Constants . . . . . . . . . . . . . 2-3
2.4.2 Character Strings . . . . . . . . . . . . . 2-3

2.5		Identifiers . . . . . . . . . . . . . . . . . . . . 	2-4

2.5.1 Keywords . .			* * * * 	2-5
2.5.2 Symbols and T~eiir*A~t;ib',~e; . . . . 2-6

2.6 Operators . . . . . * . . . . . . . . . . . . . . . . 2-7

2.6.1 Operator Examples . . . . . . . . . . . . . 2-11
2.6.2 Operator Precedence . . . . . . . . . . . . 2-13

2.7 Expressions . . . . . . . . . . . . . . . . . . . . 2-14

2.8 Statements . . . . . . . . . . . . . . . . . . . . 2-15

3 Assembler Directives

3.1 Segments . . . . . .

3.2 The Segment Directive

3.2.1 <segment name>
3.2.2 <align type> .
3.2.3 <combine, type>

3.3 The GROUP Directive

3.4 The ORG Directive

v
Table of Contents
(continued)

3.5		The	END Directive . . . . . . . . . . . . . . . . .	3-5
3.6		The	NAME Directive . . . . . . . . . . . . . . . .	3-6
3.7		The	PUBLIC Directive . . . . . . . . . . . . . . .	3-6
3.8		The	EXTRN Directive . . . . . . . . . . . . . . .	3-6
3.9		The	IF, ELSE, and ENDIF Directives . . . . . . . .	3-7

3.10 The EQU Directive . . . . . . . . . . . . . . . . .		3-7

3.11		The	DB	Directive . . . . . . . . . . . . . . . . .	3-8
3.12		The	DW	Directive . . . . . . . . . . . . . . . . .	~-q
3.13		The	DD	Directive . . . . . . . . . . . . . . . . .	3-9
3.14		The	RS	Directive . . . . . . . . . . . . . . . . .	3-9
3.15		The	RB	Directive . . . . . . . . . . . . . . . . .	3-10
3.16		The	RW	Directive . . . . . . . . . . . . . . . . .	3-10
3.17		The	RD	Directive . . . . . . . . . . . . . . . . .	3-10

3.18 The EJECT Directive . . . . . . . . . . . . . . . . 3-10
3.19 The NOIFLIST and IFLIST Directives . . . . . . . . 3-10
3.20 The NOLIST and LIST Directives . . . . . . . . . . 3-11
3.21 The PAGESIZE Directive . . . . . . . . . . . . . . 3-11
3.22 The PAGEWIDTH Directive . . . . . .. . . . . . . . . 3-11
3.23 The SIMFORM Directive . . . . . . . . . . . . . . . 3-11
3.24 The TITLE Directive . . . . . . . . . . . . . . . . 3-11
3.25 The INCLUDE Directive . . . . . . . . . . . . . . . 3-12

4		The RASK-86 Instruction Set
	4.1 Introduction . . . . . . . . .
	4.2 Data Transfer Instructions

vi
Table of Contents
(continued)

4.3 Arithmetic, Logical, and Shift Instructions . . . . 4-4

4.4 String Instructions . . . . . . . . . . . . . . . . 4-10

4.5 Control Transfer Instructions . . . . . . . . . . . 4-12

4.6 Processor Control Instructions . . . . . . . . . . 4-16

S Code-macro Facilities

5.1 Introduction to Code-macros . . . . . . . . . . . . 5-1

5.2 Specifiers . . . . . . . . . . . . . . . . . . . . 5-3

5.3 Modifiers . . . . . . . . . . . . . . . . . . . . . 5-3

5.4 Range Specifiers . . . . . . . . . . . . . . . . . 5-4

5.5 Code-macro Directives . . . . . . . . . . . . . . . 5-4

5.5.1 SEGFIX . . . . . . . . . . . . . . . . . . .		5-5
	5.5.2				NOSEGFIX 	. .	. . . . . . . . . . . . . . .	5-5
5.5.3 KODRM . . . . . . . . . . . . . . . . . . .		5-5
5.5.4 RELB and RELW . . . . . . . . . . . . . . .		5-6
5.5.5 DB, DW and DD . . . . . . . . . . . . . . .		5-7
5.5.6 DBIT . . . . . . . . . . . . . . . . . . . .		5-7

6 XRZF-86

6.1 Introduction		. . . . . . . . . . % . . . . . . . .	6-1

6.2 Invoking XREP-86 . . . . . . . . . . . . . . . . .		6-1

7 LIM-86

7.1 Introduction . . . . . . . . . . . . . . . . . . .		7-1
7.2 Invoking LINK-86 . . . . . . . . . . . . . . . . .		7-2

7.3 Definitions . . . . . . . . . . . . . . . . . . . .		7-3
7.4 The Link Process . . . . . . . . . . . . . . . . .		7-4

7.4.1 Phase 1 - Collection
7.4.2 Phase 2 - Positioning

vii
Table of Contents
(continued)

	7.5		LINK-86 Command Options . . . 	. . . . . . . . .	7-9

7.6		EXE File Options . . . . . . . . . . . . . . . . . 7-11

7.6.1		ADDITIONAL, 14AXIMUM . . . . . . . . . . . . 7-11
7.6.2		FILL/NOFILL . . . . . . . . . . . . . . . . 7-12

7.7		SYM File Options . . . . . . . . . . . . . . . . . 7-12

7.7.1		LOCALS/NOLOCALS . . . . . . . . . . . . . . 7-13
7.7.2		LIBSYMS/NOLIBSYMS . . . . . . . . . . . . . 7-13

7.8		MAP File Options . . . . .

7.9		L86 File Options . . . . . . . . . . . . . . . . . 7-14

7.10		Command Input File Options

7.11		1/0 Options. . . .

7.11.1		$Cd - Command . . . . . . . . . . . . . . . 7-16
	7.11.2		$Ld	-	Library	.	.	.	...	.	.	.	.	.	.	.	.	.	.	7-16
7.11.3		$Md - map . .	. . . . . . . . . . . . . . . 7-16
7.11.4		$Od - Object	. . . . . . . . . . . . . . . 7-16
7.11.5		$Sd - Symbol	. . . . . . . . . . . . . . .7-16

7.12		Command Line Errors

8 LIB-86

8.1		LIB-86 Operation . . . . . . . . . . . . . . . . .	8-1

8.2		LIB-86 Command Options

8.3		Creating and Updating Libraries . . . . . . . . . .	8-3

8.3.1		Creating a New Library . . . . . . . . . . .	8-3
8.3.2		Adding to a Library . . . . . . . . . . . .	8-3
8.3.3		Replacing a Module . . . . . . . . . . . . .	8-4
8.3.4		Deleting a Module . . . . . . . . . . . . .	8-4
8.3.5		Selecting a module . . . . . . . . . . . . .	8-5

8.4		Displaying Library Information

8.4.1		Cross-reference File . . . . . . . . . . . .	8-6
8.4.2		Library Module Map . . . . . . . . . . . . .	8-6
8.4.3		Partial Library Maps . . . . . . . . . . . .	8-6

viii
Table of Contents
(continued)

8.5		LIB-86 Commands on Disk . . . . . . . . . . . . . . 	8-7

8.6		Redirecting 1/0 . . . . . . . . . . . . . . . . . . 	8-7

Appendixes

A		mnemonic Differences fran'the Intel Assembler . . . . A-1

B		Reserved Words . . . . . . . . . . . . . . . . . . . . B-1

C		RASM-86 Instruction Set . . . . . . . . . . . . . . . C-1

D		Code-macro Definition Syntax . . . . . . . . . . . . . D-1

2		Sample Program . . . . . . . . . . . . . . . . . . . . B-1

F		RASM-86 Error Messages . . . . . . . . . . . . . . . F-1

G LINK-86 Error Messages . . . . . . . . . . . . . . . G-1
8 LIB-86 Error Messages . . . . . . . . . . . . . . . . H-1

I		XREF-86 Error Messages . . . . . . . . . . . . . . . I-1

ix

.0-1
Tables, Figures, and Listings

Tables

1-1.	RASM-86 Run-time Parameters . . . . . . . . . .			1-3
1-2.	RASM-86 Command Line Examples . . . . . . . . . .			1-4
2-1.	Separators and Delimiters		2-2
2-2.	Radix Indicators for Cons~an*ts		2-3
2-3.	String Constant Examples . . . . . . . . . . . .			2-3
2-4.	Register Keywords . . . . . . . . . . . . . . . .			2-5
2-5.	RASM-86 Operators . . . .		2-8
2-6.	Precedence of Operations in RJ~SM'-i6:	2-14
3-1.	Default Segment Names . . . . . . . . . . . . . .			3-3
3-2.	Default Align Types . . . . . . . . . . . . . . .			3-4
4-1.	Operand Type Symbols . . . . . . . . . . . . . .			4-1
4-2.	Flag Register Symbols . . . . . . . . . . . . . .			4-2
4-3.	Data Transfer Instructions . . . . . . . . . . .			4-3
4-4.	Effects of Arithmetic Instructions on Flags . . .			4-5
4-5.	Arithmetic Instructions . . . . . . . .		4-5
4-6.	Logical and Shift Instructions . . . .		4-7
4-7.	String Instructions . . . . . . . . . . . . . . . 4-10
4-8.	Prefix Instructions . . . . . . . . . . . . . . . 4-12
4-9.	Control Instructions . . . . . . . . . . . . . . 4-13
4-10.		Processor Control Instructions . . . . . . . . . 4-16

5-1.	Code-macro Operand Specifiers . . . . . . . . . . 5-3
5-2.	Code-macro Operand Modifiers . . . . . . . . . . 5-4
7-1.	LINK-86 Definitions . . . . . . . . . . . . . . 7-3
7-2.	LINK-86 Usage of Class Names . . . . . . . . . . 7-9
7-3.	LINK-86 Command Options. * : : : * : : * * * * * 7-10
7-4.	EXE File Option Parameters . . . . . 7-11
7-5.	Default Values for EXE File Options . . . . . . . 7-12

a-1.	LIB-86 Filetypes . . . . *	8-2
8-2.	LIB-86 Command Line Options:	8-2
A-1.	Mnemonic Differences . . . . . . . . . . . . . .		A-1
B-1.	Reserved Words . . . . . . . . . . . . . . . . .		B-1
C-1.	RASM-86 Instruction Summary . . . . . . . . . .		C-1
F-1.	RASM-86 Nonrecoverable Errors . . . . . . . . . .		F-1
F-2.	RASM-86 Diagnostic Error Messages . . . . . . . .		F-2
G-1.	LINK-86 Error Messages . . . . . . . . . . . . .		G-1
H-1.	LIB-86 Error Messages . . . . . . . . . . . . . .		H-1
I-1.	XREF-86 Error Messages . . . . . . .

x
Tables, Figures, and Listings
	(continued)

Figures

1-1.		RASM-86 Source and Object Files.
6-1.		XREP-86 operation . . . . . . . . . .
7-1.		LINK-86 operation . . . . . . . i	' i * ' 7-2
7-2.		Combining Segments with the Publi~ Cc~biine Type. 7-4
7-3.		Combining Segments with the Common Combine Type. 7-5
7-4.		Combining Segments using the Align Type . . . . . 7-6
7-5.		Paragraph Alignment . . . . . . . . . . . . . . . 7-7
7-6.		The Effect of Grouping Segments . . . . . . . . . 7-8
7-6a.		Segments without Groups . . . . . . . . . . . . . 7-8
7-6b.		Segments within a Group . . . . . . . . . . . . . 7-8
8-1.		LIB-86 Operation . . . . . . . . . . . . . . . .8-1

Listing

E-1.		Sample Program APPE.A86.

xi

00-1
	Section 1
Introduction to RASM-86

1.1 Assembler Operation

	RASM-86 processes an 8086 assembly language source f ile in
	three passes and produces an 8086 machine language object f ile.
	RASM-86 can optionally produce three output files from one source
	file as shown in Figure 1-1.

	LIST FILE
(FILENAME.LST7

SOURCE FILE			7RASM-86	OBJECT FILE
(FILENAME.A8!6!)		(FILENAME.OBJ)

SYMBOL FIL7E
YM~
(FILENAME.S		I

Figure 1-1. RASM-86 Source and Object riles

	The LST list file contains the assembly language listing with
	any error messages. The OBJ object file contains the object code in
	Intel 8086 relocatable object format. The SYM symbol file lists any
	user-defined symbols.

	The three files have the same filename as the source file. For
	example, if the name of the source file is BIOS88.A86, RASH-86
	produces the files BIOS88.OBJ, BIOS88.LST, and BIOS88.SYM.

10_-~
Programmer's Utilities Guide	1.2 Invoking RASM-86

1.2 Invoking RASM-86

Invoke RASM-86 with a command in the form:

RASM86 source file ($ optional parameters)

The filespec has the form:

[d:lfilename[.typl

where

d:	is an optional drive specification denoting the
	source file's location. The dr ive
	specification is not needed if the.source is on
	current drive.
filename	is a valid filename of 1 to 8 characters.
typ	is a valid filetype of 1 to 3 characters,
	usually A86.

	RASM-86 accepts a source file with any filetype. if you omit
	the filetype from the command line, RASM-86 searches the directory
	for the specified filename with the filetype A86.

The following are some examples of valid RASM-86 commands:

A>ra=86 b:bios88

A>ra=86 bios88.a86 $ aa ob pb sb

A>ra=86 d:test

Once invoked, RASM-86 responds with the message:

--------------------------------------------------
RASM-86 Relocating Assembler			Version X.X
Serial No. xxxx-0000-654321			All Rights Reserved
Copyright (C) 1982,1983	Digital Research, Inc.
--------------------------------------------------

	RASM-86 then attempts to open the source file. If the file
	does not exist on the designated drive or does not have the correct
	filetype, RASM-86 displays the message:

NO FILE

and stops processing.
Programmer's Utilities Guide			L2	Invoking RASK-86

	By default, RASM-86 creates the output files on the currently
	logged-in disk drive. However, you can redirect the output files by
	using the optional parameters, or by a drive specification in the
	source filename. In the latter case, RASK-86 directs the output
	files to the drive specified in the source filename.

When the assembly is complete, RASM-86 displays the message:

END OF ASSEMBLY. NUMBER OF ERRORS: n USE FACTOR: pp%

	The Use Factor indicates how much of the available Symbol Table
	space was actually used during the assembly. The Use Factor is
	expressed as a decimal percentage ranging from 0 to 99.

1.3 Optional Run-time Parameters

	The dollar sign character, $, denotes an optional string of
	run-time parameters. A parameter is a single-letter followed by a
	single-letter device name specification. The parameters are shown
	in Table 1-1.

Table 1-1. RASK-86 Run-time Parameters

Parameter			Specifies	Valid Arguments

	A		Source file device	A, B, C, 	P
L		Local symbols in object file	0
	0		Object file device	A 	P, Z
	P		List file device	A 	P, X, Y, Z
	S		Symbol file device	A 	P, X, Y, Z

	All the parameters are optional, and you can enter them in the
	command line in any order. Enter the dollar sign only once at the
	beginning of the parameter string. Spaces can separate parameters,
	but are not required. However, no space is permitted between a
	parameter and its device name.

	If you specify an invalid parameter in the parameter list,
	RASM-86 displays the message:

SYNTAX ERROR

RASM-86 then echoes the command tail up to the point where the error
occurs and follows with a question mark. (Appendix F contains the
complete list of RASM-86 error messages.)

	A device name must follow the parameters A, 0, P, and S. The
	devices are labeled as follows:

A, B, C, ... P or X, Yp Z

1-3
Programmer's Utilities Guide	1.3 Run-time Parameters

	Device names A through P specify disk drives A through P,
	respectively. X specifies the user console, Y specifies the list
	device, and Z suppresses output.

	If you direct the output to the console, you can temporarily
	stop the display at any time by typing a CTRL-S, and then restart it
	by typing CTRL-Q.

	The LO parameter directs RASM-86 to include local symbols in
	the object f ile so that they appear in the SYM f ile created by LINK
	86. Otherwise, only public symbols appear in the SYM file. You can
	use the SYM file with a symbolic instruction debugger to simplify
	program debugging.

Table 1-2. RASK-86 Command Line Examples
Command Line	T 	Result

rasm86 io	Assembles f ile IO.A86 and produces
	IO.OBJ, IO.LST, and IO.SYM, all on the
	default drive.
rasm86 io.asm $ ad sz		Assembles file IO.ASM on drive D and
	produces IO.LST and IO.OBJ.
	Suppresses the symbol file.
rasm86 io $ py sx	Assembles file IO.A86, produces IO.OBJ,
	and sends listing directly to printer.
	Also outputs symbols on console.
rasm86 io $ lo	Includes local symbols in IO.OBJ.

End of Section 1

1-4
	Section 2
Elements of RASM-86 Assembly Language

2.1 RASK-86 Character Set

	RASM-86 recognizes a subset of the ASCII character set. The
	valid characters are the alphanumerics, special characters, and
	nonprinting characters shown below:

A B C D E F G H I J X L M N 0 P Q R S T U V W X Y Z
a b c d e f g h i j k 1 m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9

+ - * / - ( ) ( I ; , - ! , - : @ $ ?

space, tab, carriage return, and line-feed

	RASM-86 treats lower-case letters as upper-case except within
	strings. Only alphanumerics, special characters, and spaces can
	appear in a string.

2.2 Tokens and Separators

	A token is the smallest meaningful unit of a RASM-86 source
	program, much as a word is the smallest meaningful unit of a
	sentence. Adjacent tokens within the source are commonly separated
	by a blank character or space. Any sequence of spaces can appear
	wherever a single space is allowed. RASM-86 recognizes horizontal
	tabs as separators and interprets them as spaces. RASM-86 expands
	tabs to spaces in the list file. The tab stops are at each eighth
	column.

2.3 Deliniters

	Delimiters mark the end of a token and add special meaning to
	the instruction; separators merely mark the end of a token. When a
	delimiter is present, separators need not be used. However, using
	separators after delimiters can make your program easier to read.

	Table 2-1 describes RASM-86 separators and delimiters. Some
	delimiters are also operators; these are explained in greater detail
	in Section 2.6.

2-1
Programmer's Utilities Guide	2.3 Delimiters

Table 2-1. Separators and Deliniters

	Character	Name		Use
	20H	space	separator

09H	tab	legal in source f iles,
		expanded in list files
CR	carriage return	terminates source lines
LF	line-feed	legal after CR;		if	in
		source lines,	it		is
		interpreted as a space
	semicolon	starts comment field
	colon	identifies a label; used
		in segment	override
		specification
	period	forms variables			from
		numbers
	dollar sign	notation for	present
		value of	location
		counter; legal,			but
		ignored in	identifiers
		or numbers
+	plus	arithmetic operator for
		addition
	minus	arithmetic operator for
		subtraction
	asterisk	arithmetic operator for
		multiplication
	slash	arithmetic operator for
		division
	at	legal in identifiers
	underscore	legal in identifiers
	exclamation	logically terminates a
	point	statement,	allowing
		multiple statements on.a
		single source line
	apostrophe	delimits string constants

2-2
Programmer's Utilities Guide		2.4 Constants

2.4 Constants

	A constant is a value known at assembly time that does not
	change while the assembled program is running. It can be either an
	integer or a character string.

2.4.1 Numeric Constants

	A numeric constant is a 16-bit value in one of several bases.
	The base, called the radix of the constant, is denoted by a trailing
	radix indicator. The radix indicators are shown in Table 2-2.

Table 2-2. Radix Indicators for Constants
Indicator F Constant Type		Base
B			binary	2
0			octal	8
Q			octal	8
D			decimal	10
H			hexadecimal	16

	RASM-86 assumes that any numeric constant that does not
	terminate with a radix indicator is a decimal constant. Radix
	indicators can be upper- or lower-case.

	A constant is thus a sequence of digits followed by an optional
	radix indicator where the digits are in the range for the radix.
	Binary constants must be composed of zeros and ones. Octal digits
	range from 0 to 7; decimal digits range from 0 to 9. Hexadecimal
	constants contain decimal digits and the hexadecimal digits A (10D) ,
	B (11D) , C (12D) , D (13D) , E (14D) , and F (15D) . The leading
	character of a hexadecimal constant must be a decimal digit so that
	RASM-86 cannot confuse a hex constant with an identifier. The
	following are valid numeric constants:

1234		1234D 1100B 1111000011110000B
1234H		OFFEH 33770 13772Q
33770				OFE3H	1234d	Offffh

2.4.2 Character Strings

	A character string constant is a string of ASCII characters
	delimited by apostrophes. All RASM-86 instructions that allow
	numeric constants as arguments, accept only one- or two- character
	constants as valid arguments. All instructions treat a one
	character string as an 8-bit number, and a two-character string as a
	16-bit number. The value of the second character is in the low
	o'rder byte, and the value of the first character is in the high
	order byte.

2-3
Programmer's Utilities Guide	2.4 Constants

	The numeric value of a character is its ASCII code. RASM-86
	does not translate case in character strings, so you can use both
	upper- and lower-case letters. Note that RASM-86 allows only
	alphanumerics, special characters, and spaces in character strings.

	A DB directive is the only RASM-86 statement that can contain
	strings longer than two characters (see Section 3.8). The string
	cannot exceed 255 bytes. If you want to include an apostrophe in
	the string, you must enter it twice. RASM-86 interprets the two
	keystrokes '' as a single apostrophe. Table 2-3 shows valid
	character strings and how they appear after processing.

Table 2-3. String Constant Examples
String in source text I As processed by RASM-86
		a
	'Ab"Cd'	Ab'Cd
	I like IBM'	I like IBM
	III	I
	'ONLY UPPER CASE'	ONLY UPPER CASE
	'only lower case'	only lower case

2.5 identifiers

The following rules apply to all identifiers:

o		Identifiers can be up to 80 characters long.

*		The first character must be alphabetic, one of the special
characters ?, @, or the underscore character

e		Any subsequent characters can be either alphabetic, numeric, or
the special characters ?, @, . or $. RASM-86 ignores the
special character $ in identifi-ers, so that you can use it to
improve readability in long identifiers. For example, RASM-86
treats the identifier interrupt$flag as interruptfla[.

	There are two types of identif iers. The first type are
	keywords that have predefined meanings to RASM-86. The second type
	are symbols you define. The following are all valid identifiers:

NOLIST
WORD
AH
Third street
How aie you today
variabl-e@nu-mbe[@1234567890

2-4
Programmer's Utilities Guide			2.5 	Identifiers

2.5.1 Keywords

	Keywords are reserved for use by RASM-86; you cannot define an
	identifier identical to a keyword. Appendix D contains the complete
	list of keywords.

RASM-86 recognizes five types of keywords:

instructions
directives
operators
registers
predefined numbers

	Section 4 defines the 8086 instruction mnemonic keywords and
	the actions they initiate. Section 3 discusses RASM-86 directives.
	Section 2.6 defines operators. Table 2-4 lists the RASM-86 keywords
	that identify 8086 registers.

	Three keywords, BYTE, WORD, and DWORD, are predefined numbers.
	The values of these numbers are 1, 2, and 4. respectively. RASM-86
	also associates a Type attribute with each of these numbers. The
	keyword's Type attribute is equal to the keyword's numeric value.

Table 2-4. Register Keywords

Register			Numeric
Symbol TS ize(bytes)		Value	Meaning

AH					1	100	B	Accumulator High Byte
BH					1	Ill	B	Base Register High Byte
CH					1	101	B	Count Register High Byte
DH					1	110	B	Data Register High Byte
AL					1	000	B	Accumulator Low Byte
BL					I	Oll	B	Base Register Low Byte
CL					1	001	B	Count Register Low Byte
DL					1	010	B	Data Register Low Byte
AX					2	000	B	Accumulator (full word)
BX					2	Oll	B	Base Register (full word)
CX					2	001	B	Count Register (full word)
DX					2	010	B	Data Register (full word)
BP					2	101	B	Base Pointer
SP					2	100	B	Stack Pointer
SI					2	110	B	Source Index
DI					2	111	B	Destination Index

2-5
Programmer's Utilities Guide	2.5 Identifiers

Table 2-4. (continued)

Register			Numeric
Symbol		I Size(bytes) I	Value	Meaning
CS	2	01 B	Code Segment Register
DS	2	11 B	Data Segment Register
SS	2	10 B	Stack Segment Register
ES	2	00 B	Extra Segment Register

Symbols and Their Attributes

	A symbol is a user-defined identifier that has attributes
	specifying the kind of information the symbol represents. Symbols
	fall into three categories:

		variables
		labels
		numbers

	Variables identify data stored at a particular location in
	memory. All variables have the following three attributes:

		Segment tells which segment was being assembled when the
variable was defined.

		Offset tells how many bytes there are between the beginning of
the segment and the location of this variable.

		Type tells how many bytes of data are manipulated when this
variable is referenced.

	A segment can be a code segment, a data segment, a stack
	segment, or an extra segment, depending on its contents and the
	register that contains its starting address (see Section 3.2). The
	segment's starting address is a number between 0 and 65,535D. This
	number indicates the paragraph in memory to which the current
	segment is assigned, either when the program is assembled, when it
	is linked, or when it is loaded.

	The offset of a variable is the address of the variable
	relative to the starting address of the segment. The offset can be
	any number between 0 and OFFFFH or 65,535D.

A variable has one of the following Type attributes:

		BYTE
		WORD
DWORD

2-6
Programmer's Utilities Guide		2.5 Identifiers

	BYTE specifies a one-byte variable; WORD, a two-byte variable,
	and DWORD, a four-byte variable. The DB, DW, and DD directives
	define variables as these three types (see Section 3). For example,
	a variable is defined when it appears as the name for a storage
	directive:

my_variable		db 0

	You can also define a variable as the name for an EQU directive
	referencing another variable, as shown below:

another-variable equ my_variable

	Labels identify locations in memory that contain instruction
	statements. They are referenced with jumps or calls. All labels
	have two attributes, segment and offset.

	Label segment and offset attributes are essentially the same as
	variable segment and offset attributes. A label is defined when it
	precedes an instruction. A colon separates the label from
	instruction. For example,

my_label:		add ax,bx

	A label can also appear as the name for an EQU directive
	referencing another label. For example,

another-label			equ 	my_label

	You can also define numbers as symbols. RASM-86 treats a
	number symbol as though you have explicitly coded the number it
	represents. For example,

Number five			equ 	5
	mov		-il,Number-five
is equivalent to:

mov		al,5

	Section 2.6 describes operators and their effects on numbers
	and number symbols.

2.6 Operators

RASM-86 operators fall into the following categories:

arithmetic
logical
relational
segment override
variable manipulators and creators

2-7
Programmer's Utilities Guide	2.6 dperators

	Table 2-5 def ines the RASM-86 operators. In this table, a and
	b represent two elements of the expression. The validity column
	defines the type of operands the operator can manipulate. The
	vertical bar character I separates alternatives.

	In this table, number refers to an absolute number which is a
	number whose value is known at assembly-time, such as a numeric
	constant. A relocatable number is a number whose value is unknown
	at assembly-time, because it can change during the linking process.
	For example, the offset of a variable located in a segment that will
	be combined with some other segments at link-time is a relocatable
	number.

Table 2-5. RASK-86 Operators

2-8

Syntax	Result	Validity
	Logical Operators
 XOR b		bit-by-bit logical EXCLUSIVE	a, b - number
	OR of a and b
 OR b		bit-by-bit logical OR of a	a, b - number
	and b.
 AND b		bit-by-bit logical AND of a	a,.b = number
	and b
NOT a	logical inverse of a: all Os 		a = 16-bit number
	become ls, ls become Os
	Relational Operators
 EQ b	returns OFFFFH if a - b,	a, b 0 unsigned
	otherwise 0	numbers; or labels,
		variables, or
		relocatable numbers.
		defined in the same
		segment
 LT b	returns OFFFFH if a < b,	a, b - unsigned
	otherwise 0	numbers; or labels,
		variables, or
		relocatable numbers
		defined in the same
		segment
 LE b	returns OFFFFH if a <= b,	a, b - unsigned
	otherwise 0	numbers; or labels,
		variables, or
		relocatable numbers
		defined in the same
		segment
Programmer's Utilities Guide		2.6 Operators

Table 2-5. (continued)

Syntax			Result	T 	Validity
* GT b			returns OFFFFH if a > b,	a, b - unsigned
	otherwise 0		numbers; or labels,
		variables, or
		relocatable numbers
		defined in the same
		segment
* GE b			returns OFFFFH if a >- b,	a, b - unsigned
	otherwise 0		numbers; or labels,
		variables, or
		relocatable numbers
		defined in the same
		segment
* NE b			returns OFFFFH if a <> b,	a, b - unsigned
	otherwise 0		numbers; or labels,
		variables, or
		relocatable numbers
		defined in the same
		segment
Arithmetic Operators
* + b			arithmetic sum of a and b	a - number,
		variable, label,
		relocatable number,
		or external
		b - number
a - b			arithmetic difference of	a - number,
	a and b		variable, label,
		relocatable number,
		or external
		b - number; or
		variable, label, or
		relocatable number
		in the same segment
		as a
a b		does unsigned multipli-	b - number
	cation of a and b
a b			does unsigned division of	a, b - number
	a and b
a MOD b			returns remainder of a / b	a, b - number
a SHL b			returns the value that	a, b - number
	results from shifting a
	to left by an amount b

0

2-9
Programmer's Utilities Guide	2.6 Operators

Table 2-5. (continued)

Syntax		I Result	Validity
* SHR b		- returns the value that	a, 	b - number
	results from shifting a
	to the right by an
	amount b
* a	gives a	a 		- number
- a	gives 0 - a	a 		- number
Segment Override
<seg reg>: overrides assembler's choice	<seg reg>
<addr exp> of segment register	CS, DS, SS
or ES
Variable Manipulators, 	Creators
SEG a	creates a number whose	a - 		label variable
	value is the segment
	value of the variable or
	label a
OFFSET a		creates a number whose	a = 	label variable
	value is the offset
	value of the variable or
	label a
TYPE a	creates a number. If	a = 		label variable
	the variable a is of type
	BYTE, WORD or DWORD, the
	value of the number is 1,
	2, or 4, respectively
LENGTH a		creates a number whose	a	variable
	value is the length
	attribute of the variable
	a. The length attribute
	is the number of bytes
	associated with the
	variable
LAST a	if LENGTH a > 0, then	a - 		variable
	LAST a = LENGTH a - 1;
	if LENGTH a = 0, then
	LAST a = 0.
a PTR b	creates virtual variable	a - 		BYTE I WORD
or label with.type of a	I DWORD
and attributes of b	-addr exp>

2-10
Programmer's Utilities Guide		2.6 Operators

Table 2-5. (continued)
Syntax			Result	I	Validity

.a		creates variable with an	a - number
	offset attribute of a.
	Segment attribute is
	current data segment

	$		creates label with offset	no argument
		equal to current value of
		location counter; segment
		attribute is current
		segment
	2.6.1 Operator Examples

	Logical operators accept only numbers as operands. They
	perform the Boolean logic operations AND, OR, XOR, and NOT. For
	example,

	OOFC				mask	equ	Ofch
	0080				signbit	equ	80h
	0000 B180				mov	cl,mask and signbit
	0002 B003				mov	al,not mask

	Relational operators treat all operands as unsigned numbers.
	The relational operators are EQ (equal), LT (less than), LE (less
	than or equal), GT (greater than), GE (greater than or equal), and
	NE (not equal) . Each operator compares two operands and returns all
	ones (OFFFFH) if the specified relation is true, and all zeros if it
	is not. For example,

	OOOA				limitl	equ	10
	0019				limit2	equ	25
0004 B8FFFF				mov	ax,limitl lt limit2
0007 B80000				mov	ax,limitl gt limit2

	Addition and subtraction operators compute the arithmetic sum
	and difference of two operands. The first operand can be a
	variable, label, or number. For addition, the second operand must
	be a number. For subtraction, the second operand can be a number,
	or it can be a variable or label in the same segment as the first
	operand. When a number is added to a variable or label, the result
	is a variable or label with an offset whose numeric value is the
	second operand plus the offset of the first operand. Subtraction
	f rom a var iable or label. returns a variable or label whose of f set is

2-11
Programmer's Utilities Guide	2.6 Operators

the first operand's offset, decremented by the number specified in
the second operand. For example,

	0002	count	equ	2
	0005	displ	equ	5
OOOA FF	flag	db	offh
OOOB 2EAOOBOO		mov	al,flag+l
OOOF 2E8AOEOFOO		mov	cl,flag+displ
0014 B303		mov	bl,displ-count

The multiplication and division operators	MOD, SHL, and
SHR accept only numbers as operands. * and / treat all operators as
unsigned numbers. For example,

0016 BE5500	mov	si,256/3
0019 B310	mov	bl,64/4
	0050	buffersize		equ	80
001B BBAOOO		mov	ax,buffersize * 2

	Unary operators accept both signed and unsigned operators, as
	shown below.

001E B123	mov	cl,+35
0020 B007	mov	al,2--5
0022 B2F4	mov 	dl,-12

	When manipulating variables, RASM-86 decides which segment
	register to use. You can override this choice by specifying a
	different register with the segment override operator. The syntax
	for the override operator is

	segment register: address expression
	where the segment register is CS, DS, SS, or ES. For example,

0024 36SB472D	mov	ax,ss:wordbuffer[bx]
0028 268BOE5BOO	mov	cx,es:array
002D 26A4	movs	byte ptr [dil,es:[sil

	A variable manipulator creates a number equal to one attribute
	of its variable operand. SEG extracts the variable's segment value;
	OFFSET, its offset value; TYPE, its type value (1, 2, or 4), and
	LENGTH, the number of bytes associated with the variable. LAST
	compares the variable's LENGTH with zero. If LENGTH is greater than
	zero, LAST decrements LENGTH by one. If LENGTH equals zero, LAST
	leaves it unchanged. Variable manipulators accept only variables as
	operators. For example,

2-12
Programmer's Utilities Guide		2.6 Operators

002D 000000000000					wordbuffer	dw	0,0,0
0033 0102030405					buffer	db	1,2,3,4,5
0038 B80500					mov	ax,length buffer
003B B80400			mov	ax,last buffer
003E B80100			mov	ax,type buffer
0041 B80200			mov	ax,type wordbuffer

	The PTR operator creates a virtual variable or label valid only
	during the execution of the instruction. PTR makes no changes to
	either of its operands. The temporary symbol has the same Type
	attribute as the left operator, and all other attributes of the
	right operator as shown below.

0044 C60705			mov	byte ptr [bxl, 5
0047 8AO7			mov	al,byte ptr [bxl
0049 FF04			inc	word ptr [sil

	The period operator . creates a variable in the current Data
	segment. The new variable has a segment attribute equal to the
	current Data segment and an offset attribute equal to its operand

Its operand must be a number. For example,

004B A10000			mov	ax, .0
004E 268BIE0040			mov	bx, es: .4000h

The dollar sign operator $ creates a label with an offset
attribute equal to the current value of the location counter. The
label segment value is the same as the current segment. This
operator takes no operand. For example,
	0053 E9FDFF			imp	$
	0056 EBFE			jmps 	$
0058 E9FD2F			imp	$+3000h

2.6.2		Operator Precedence

	Expressions combine variables, labels, or numbers with
	operators. RASM-86 allows several kinds of expressions (see Section
	2.7). This section defines the order in which RASM-86 performs
	operations if more than one operator appear in an expression.

	RASM-86 evaluates expressions from left to right, but evaluates
	operators with higher precedence before operators with lower
	precedence. When two operators have equal precedence, RASM-86
	evaluates the leftmost operator first. Table 2-6 shows RASM-86
	operators in order of increasing precedence.

2-13
Programmer's Utilities Guide	2.6 Operators

	You can use parentheses to override the precedence rules.
	RASM-86 first evaluates the part of an expression enclosed in
	parentheses. If you nest parentheses, RASM-86 evaluates the
	innermost expressions first. For example,

15/3 + 18/9 - 5 + 2 = 7
15/(3 + 18/9) = 15/(3 + 2) = 15/5 = 3
(20*4) + ((27/9 - 4/2)) = (20*4) + (3 - 2) = 80 + 1 = 81

Note that RASM-86 allows five levels of nested parentheses.

Table 2-6. Precedence of Operations in RASK-86

	Order	Operator Type			Operators
	1	Logical			XOR, OR
	2	Logical			AND
	3	Logical			NOT
	4	Relational		EQ, LT, LE, GT,
					GE, NE
	5	Addition/subtraction
	6	Multiplication/division MODI SHL,
					SHR
	7	Unary			+, -
	8	Segment override	<segment override>:
	9	Variable manipulators,		SEG, OFFSET, PTR,
		creators		TYPE, LENGTH, LAST
	10	Parentheses/brackets I I
	11	Period and Dollar			$

2.7 Expressions

	RASM-86 allows address, numeric, and bracketed expressions. An
	address expression evaluates to a memory address and has three
	components:

 a segment value
 an offset value
 a type

2-14
Programmer's Utilities Guide		2.7 Expressions

	Both variables and labels are address expressions. An address
	expression is not a number, but its components are numbers. You can
	combine numbers with operators such as PTR to make an address
	expression.

	A numeric expression evaluates to a number. It contains no
	variables or labels, only numbers and operands.

	Bracketed expressions spec if y base- and index-addressing modes.
	The base registers are BX and BP, and the index registers are DI and
	SI. A bracketed expression can consist of a base register, an index
	register, or both.

	Use the + operator between a base register and an index
	register to specify both base- and index-register addressing. For
	example,

mov variable[bx],O
mov ax,Cbx+dil
mov ax,(sil

2.8 Statements

	Statements can be instructions or directives. RASM-86
	translates instructions into 8086 machine language instructions.
	RASM-86 does not translate directives into machine code. Directives
	simply tell RASM-86 to perform certain functions.

	You must terminate each assembly language statement with a
	carriage return (CR) and line-feed (LF) , or with an exclamation
	point. RASM-86 treats these as an end-of-line. You can write
	multiple assembly language statements without comments on the same
	physical line and separate them with exclamation points. Only the
	last statement on a line can have a comment because the comment
	field extends to the physical end of the line.

	Section 3 describes the RASM-86 instruction set in detail. The
	syntax for an instruction statement is

	[label:]		(prefix] mnemonic [operand(s)] [;comment]
	where the fields are defined as:

label			A symbol followed by a colon defines a label
	at the current value of the location counter
	in the		current segment. This field is
	optional.
prefix			Certain machine instructions such as LOCK and
	REP can prefix other instructions. This
	field is optional.
		2-15
Programmer's Utilities Guide	2.8 Statements

mnemonic	A symbol def ined as a machine instruction,
	either by RASM-86 or by an EQU directive.
	This field is optional unless preceded by a
	prefix instruction. If you omit this field,
	no operands can be present, although the
	other fields can appear. Section 4 describes
	the RASM-86 mnemonics.

operand(s)	An instruction mnemonic can require other
symbols to represent operands to the
instruction. Instructions can have zero,
one, or two operands.

comment	Any semicolon appearing outside a character
	string begins a comment. A comment ends with
	a carriage return. This field is optional,
	but you should use comments to facilitate
	program maintenance and debugging.

	Section 3 describes the RASM-86 directives. The syntax for a
	directive statement is

	[name]		directive operand(s) [;comment]
	where the fields are defined as:

name	Names are legal for CSEG, DSEG, ESEG, SSEG,
	GROUP, DB, DW, DD, RB, RW, RD, RS, and EQU
	directives. The name is required for the EQU
	and GROUP directives, but it is optional for
	the other directives. Unlike the label field
	of an instruction, the name field of a
	directive is never terminated with a colon.
directive	One of the directive keywords defined in
	Section 3.

operand(s)		Analogous to the operands for instruction
mnemonics. Some directives, such as DB and
DW allow any operand; others have special
requirements.

comment	Exactly as defined for instruction
	statements.
	End of Section 2

2-16
	Section 3
Assembler Directives

	Assembler directives control the assembly process by performing
	functions such as assigning portions of code to logical segments,
	requesting conditional assembly, defining data items, allocating
	memory, specifying listing file format, and including source text
	from external files.

	Section 2.8 shows the general syntax for directive statements.
	The following sections give the specific syntax and explanation for
	each directive statement. In the general syntax line for each
	statement, square brackets [] enclose optional arguments, user
	supplied arguments are shown in angle brackets.

Assembler directives are grouped into the following categories:

 segment control

CSEG					DSEG	ESEG	SSEG 	GROUP

 linkage control

NAME				PUBLIC	EXTRN	END

* conditional assembly

IF			ELSE 	ENDIF

 symbol definition

EQU

 data definition and memory allocation

DB							DW	DD	RS	RB	RW 	RD

 output listing control

EJECT			IFLIST/NOIFLIST	LIST/NOLIST	PAGESIZE

PAGEWIDTH			SIMFORM	TITLE

 miscellaneous

INCLUDE		ORG
Programmer's Utilities Guide	3.1 		Segments

3.1 Segments

	The 8086 CPU can address one megabyte (1,048,576 bytes) of
	memory. This entire address space can be subdivided into an
	arbitrary number of smaller units called segments. These can be up
	to 64K bytes in length. Each segment is comprised of contiguous
	memory locations that make up a logically independent and separately
	addressable unit. Each segment must have a base address that
	specifies its starting location in the memory space. Each segment
	base address must begin on a boundary divisible by 16, but there are
	no other restrictions on segment boundaries.

	Every location in the memory space has a physical address and a
	logical address. A physical address is a 20-bit value that
	specifies a unique byte location within the memory space. A logical
	address is the combination of a 16-bit segment base value and a 16
	bit offset value. The offset value is the address relative to the
	base of the segment. At run-time, every memory reference is the
	combination of a segment base value and an offset value that
	produces a 20-bit physical address. Note that a physical address
	can be contained in more than one logical segment.

	The CPU can access four segments at a time. The base address
	of each segment is contained in a segment register. The CS register
	points to the current Code segment that contains instructions. The
	DS register points to the current Data segment that usually contains
	program variables. The SS register points to the current Stack
	segment where stack operations such as temporary storage or
	parameter passing are performed. The ES register points to the
	current Extra segment that also typically contains data.

	RASM-86 segment directives allow you to divide your assembly
	language source program into segments that correspond to the memory
	segments into which the resulting object code is eventually loaded
	at run-time.

	The size and type of segments you use in a program determine
	the type of memory execution model used by the operating system.
	You can intermix all of the code and data in a single 64K segment,
	or you can have separate Code and Data segments, each up to 64K in
	length. With RASM-86, you can also create an arbitrary number of
	Code, Data, Stack, and Extra segments to more fully use the address
	space of the 8086 processor. You can therefore have more than 64K
	of code or data by using several segments and managing the segments
	with the assembler directives.

3.2 The Segment Directive

	Every instruction and variable in a program must be contained
	in a segment. Instruction statements must be assigned to the Code
	Segment, but directive statements can be assigned to any segment.
	Create a segment and name it by using the following Segment
	directive.

[<segment name>1<segment>[<align type>][<combine type>]

3-2
Programmer's Utilities Guide	3.2 The Segment Directive

where <segment> is one of the following:

CSEG (Code Segment)
DSEG (Da-ta Segment)
ESEG (Extra Segment)
SSEG (Stack Segment)

For example,

DATASEG	DSEG	PARA
CODE1	CSEG	BYTE
XYZ	DSEG	WORD	COMMON

3.2.1 <segment name>

	The <segment name> can be any valid RASM-86 identifier. If you
	do not specify a <segment name>, RASM-86 supplies a default name.
	Table 3-1 shows the default names.

Table 3-1. Default Segment Names

Segment Directive	Default Name
	CSEG		CODE
	DSEG		DATA
	ESEG		EXTRA
	SSEG		STACK

	Once you use a Segment directive, RASM-86 assigns statements to
	the specified segment until it encounters another Segment directive.
	RASM-86 combines all segments with the same <segment name> even if
	they are not contiguous in the source code.

3.2.2 <align type>

	The <align type> allows you to specify to the linkage editor a
	particular boundary for the segment. The linkage editor uses this
	alignment information to combine segments when it produces an
	executable file. You can specify one of three different types:

BYTE (byte alignment)
	WORD (word alignment)
	e PARA (paragraph alignment)

	If you specify an <align type>, it must be with the first
	definition of the segment. You can cmit the <align type> on
	subsequent Segment directives that name the same segment, but you
	cannot change the original value. If you do not specify an <align
	type>, RASM-86 supplies a default value. Table 3-2 shows the
	default values.

3-3

Ao~l
Programmer's Utilities Guide	3.2 The Segment Directive

Table 3-2. Default Align Types
Segment Directives I Default Align Type

CSEG	BYTE
DSEG	WORD
ESEG	WORD
SSEG 	WORD

	BYTE alignment means that the segment begins at the next byte
	following the previous segment.

	WORD alignment means that the segment begins on an even
	boundary. An even boundary is a hexadecimal address ending in
	0,2,4,6,8,A,C, or E. In certain cases, WORD alignment can increase
	execution speed because the CPU takes only one memory cycle when
	accessing word-length variables within a segment aligned on an even
	boundary. Two cycles are needed if the boundary is odd.

	PARA (paragraph) alignment means that the segment begins on a
	paragraph boundary, that is, an address whose four low-order bits
	are zero.

3.2.3 <ccmbine.type>

	The <com-bine type> determines how the linkage editor can
	combine the segment with other segments with the same <segment
	name>. You can specify one of two different types:

PUBLIC
COMMON

	If you specify a <combine type>, it must be with the first
	definition of the segment. You can omit the <combine type> on
	subsequent Segment directives that name the same segment, but you
	cannot change the original type. If you do not specify a <combine
	type>, RASK-86 supplies the default type, PUBLIC.

	PUBLIC means that the linkage editor can combine the segment
	with other segments that have the same name. All such segments with
	<combine type> PUBLIC are concatenated in the order they are
	encountered by the linkage editor, with gaps, if any, determined by
	the <align type> of the segment.

	COMMON means that the segment shares identical memory locations
	with other segments of the same name. Offsets inside a COMMON
	segment are absolute unless the segment is contained in a GROUP (see
	Section 3.3).

3-4
Programmer's Utilities Guide		3.3 The GROUP Directive

3.3 The GROUP Directive

<group name> GROUP <segment name 1>,<segment name 2> ....

	The GROUP directive instructs RASM-86 to combine the named
	segments into a collection called a group whose length can be up to
	64K. Offsets within any of the segments of a group are relative to
	the beginning of the group rather than the beginning of the segment.

	The order of the <segment name>s in the directive is the order
	in which the linkage editor arranges the segments in the EXE file

3.4 The ORG Directive

ORG <numeric expression>

	The ORG directive sets the offset of the location counter in
	the current segment to the value specified in the numeric
	expression. You must define all elements of the expression before
	using the ORG directive, and the expression must evaluate to an
	absolute number.

	The <numeric expression> is relative to the location counter
	within the segment at load-time. Thus, if you use an ORG statement
	in a segment that the linkage editor does not combine with other
	segments at link-time, such as a common segment that is not in a
	group, then <numeric expression> indicates the actual offset within
	the segment.

	However, if the segment is combined with others at link-time,
	such as PUBLIC segments, then <numeric expression> is not an
	absolute offset. It is relative to the beginning part of the
	segment, from the program being assembled.

	Use of groups can result in more efficient code, because a
	number of segments can be addressed from a single segment register
	without having to change the contents of the segment register.

3.5 The END Directive

END [<start label>]

	The END directive marks the end of a source file. RASM-86
	ignores any subsequent lines. The END directive is optional, and if
	omitted, RASM-86 processes the source file until it finds an end-of
	file character (1AH).

	The optional <start label> serves two purposes. First it
	defines the current module as the main program. When LINK-86 links
	modules together, only one can be a main program. The <start label>
	also indicates where the program is to start executing after it is
	loaded. If <start label> is omitted, program execution begins at
	the beginning of the first CSEG from the files linked.

3-5
Programmer's Utilities Guide	3.6 The NAME Directive

3.6 The NAME Directive

NAME '<module name>'

	The NAME directive assigns a name to the object module
	generated by RASM-86. The '<module name>' can be any valid
	identifier. If you do not specify a module name with the NAME
	directive, RASM-86 assigns the source filename to the object module.
	Both LINK-86 and LIB-86 use object module names to identify object
	modules.

3.7 The PUBLIC Directive

PUBLIC <name>[,<name> ....

	The PUBLIC directive instructs RASM-86 that the names defined
	as PUBLIC can be referenced by other programs which are linked
	together. Each name must be a label, variable, or a number that is
	defined within the program being assembled.

3.8 The EXTRN Directive

EXTRN <external id> [,<external id> .... I

	The EXTRN directive tells RASM-86 that each <external id> can
	be referenced in the program being assembled but is defined in some
	other program. The <external id> consists of two parts: a symbol
	and a type. The symbol can be a variable, label, or number.

Type is one of the following:

 Variables:
BYTE
WORD
DWORD

 Labels:
NEAR
PAR

 Numbers:
ABS

For example,

EXTRN		FCB:BYTE,BUFFER:WORD,INIT:FAR,MAX:ABS

	RASM-86 determines the Segment attribute of external variables
	and labels from the segment containing the EXTRN directive. Thus,
	an EXTRN directive for a given symbol must appear within the segment
	in which the symbol is defined in some other module.

3-6
Programmer's Utilities Guide		3.9 IF, ELSE, and ENDIF

3.9 The IF, ELSE, and ENDIF Directives

IF		<numeric expression>
	< source line 1 >
	< source line 2 >

< source line n >

[ELSE]
	< alternate source line 1 >
	< alternate source line 2 >

< alternate souice line n >

ENDIF

	The IF and ENDIF directives allow you to conditionally include
	or exclude a group of source lines from the assembly. The optional
	ELSE directive allows you to specify an alternative set of source
	lines. You can use these conditional directives to assemble several
	different versions of a single source program. You can nest IF
	directives to five levels.

	When RASM-86 encounters an IF directive, it evaluates the
	numeric expression following the IF keyword. You must define all
	elements in the numeric expression before you use them in the IF
	directive. If the value of the expression is nonzero, then RASM-86
	assembles <source line 1> through <source line n>. If the value of
	the expression is zero, then RASM-86 lists all the lines, but does
	not assemble them.

	If the value of the expression is zero, and you specify an ELSE
	directive between the IF and ENDIF directives, RASM-86 assembles the
	alternative source lines.

3.10 The EQU Directive

symbol			EQU	<numeric expression>
symbol			EQU	<address expression>
symbol			EQU	<register>
symbol			EQU	<instruction mnemonic>

	The EQU (equate) directive assigns values and attributes to
	user-defined symbols. Do not put a colon after the symbol name.
	Once you define a symbol, you cannot redefine the symbol with a
	subsequent EQU or another directive. You must also define any
	elements used in numeric or address expressions before using the EQU
	directive.

3-7
Programmer's Utilities Guide	3.10 The EQU Directive

	The first form assigns a numeric value to the symbol. The
	second assigns a memory address. The third form assigns a new name
	to an 8086 register. The fourth form defines a new instruction
	(sub)set. The following are examples of these four forms.

	0005	FIVE	EQU	2*2+1
	0033	NEXT	EQU	BUFFER
	0001	COUNTER	EQU	CX
		M0VVV		EQU	MOV
	005D 8BC3		MOVVV		AX,BX

3.11 The DB Directive

[symbol] DB <numeric expression>[,<numeric expression> ...
[symbol] DB <string constant>[,<string constant> ... ]

	The DB directive defines initialized storage areas in byte
	format. RASM-86 evaluates numeric expressions to 8-bit values and
	sequentially places them in the object file. RASM-86 places string
	constants in the object file according to the rules defined in
	Section 2.4.2. Note that RASM-86 does not perform translation from
	lower- to upper-case within strings.

	The DB directive is the only RASM-86 statement that accepts a
	string constant longer than two bytes. You can add multiple
	expressions or constants, separated by commas, to the definition as
	long as it does not exceed the physical line length.

	Use an optional symbol to reference the defined data area
	throughout the program. The symbol has four attributes: the
	segment and offset attributes determine the symbol's memory
	reference; the type attribute specifies single bytes, and the length
	attribute tells the number of bytes reserved.

The following statements show DB directives with symbols:

005F		43502F4D2073	TEXT	DB	'CP/M system',O
	797374656DOO
006B		El	AA	DB	fal + 80H
006C		0102030405	X	DB	1,2,3,4,5
0071		B90COO		MOV	CX,LENGTH TEXT

3-8
Programmer's Utilities Guide		3.12 The DW Directive

3.12 The DW Directive

[symbol] DW <numeric expression>[,<numeric expression> ... I
[symbol] DW <string constant>[,<string constant> ... I

	The DW directive initializes two-byte words of storage. The DW
	directive initializes storage the same way as the DB directive,
	except that each numeric expression, or string constant initializes
	two bytes of memory with the low-order byte stored first. The DW
	directive does not accept string constants longer than two
	characters.

The following are examples of DW statements:

0074					0000	CNTR	DW	0
0076					63C166C169C1 JMPTAB	DW	SUBR1,SUBR2,SUBR3
007C					010002000300	DW	1,2,3,4,5,6
	040005000600

3.13 The DD Directive

[symbol] DD <address expression>[,<address expression> ...

	The DD directive initializes four bytes of storage. The offset
	attribute of the address expression is stored in the two lower
	bytes; the segment attribute is stored in the two upper bytes.
	Otherwise, DD follows the same procedure as DB. For example,

CSEG

0000			6CC100006FC1 LONG-JMPTAB	DD	ROUT1,ROUT2
	0000
0008			72C1000075C1	DD	ROUT3,ROUT4
	0000

3.14 The RS Directive

[symbol]			RS	<numeric expression>

	The RS directive allocates storage in memory but does not
	initialize it. The numeric expression gives the number of bytes to
	reserve. Note that the RS directive does not give a Byte attribute
	to the optional symbol. For example,

0010				BUF	RS	80
0060				RS	4000H
4060				RS	1

3-9
Program:mer's Utilities Guide	3.15 The RB Directive

3.15 The RB Directive

[symbol]		RB	<numeric expression>

	The RB directive allocates byte storage in memory without any
	initialization. The RB directive is identical to the RS directive
	except that it gives the byte attribute.

3.16 The RW Directive

[symbol]		RW <numeric expression>

	The RW directive allocates two-byte word storage in memory but
	does not - initialize it. The numeric expression gives the number of
	words to be reserved. For example,

4061	BUFF	RW	128
4161		RW 	4000H
C161	RW	1

3.17 The RD Directive

[symbol]		RD	<numeric expression>

	The RD directive reserves a double word (four bytes) of storage
	but does not initialize it. For example,

C163	DWTAB	RD 	4
C173	RD	1

3.18 The ZJZCT Directive

EJECT

	The EJECT directive performs a page eject during printout. The
	EJECT directive is printed on the first line of the next page.

3.19 The NOIFLIST and IFLIST Directives

NOIFLIST
IFLIST

	The NOIFLIST directive suppresses the printout of the contents
	of conditional assembly blocks that are not assembled. The IFLIST
	directive resumes printout of these blocks.

3-10
Programner's Utilities Guide		3.20 The NOLIST/LIST Directives

3.20 The NOLIST and LIST Directives

NOLIST
LIST

	The NOLIST directive suppresses the printout of lines following
	the directive. The LIST directive restarts the listing.

3.21 The PAGZSIZZ Directive

PAGESIZE		<numeric expression>

	The PAGESIZE directive defines the number of lines on each
	printout page. The default page size is 66 lines.

3.22 The PAGMDTH Directive

PAGEWIDTH		<numeric expression>

	The PAGEWIDTH directive defines the number of columns printed
	across the page of the listing file. The default page width is 120
	unless the listing is routed directly to the console; then the
	default page width is 79.

3.23 The SINFOR14 Directive

SIMFORM

	The SIMPORM directive replaces a form-feed (FF) character in
	the list file with the correct number of line-feeds (LF) . Use this
	directive when directing a list file to a printer that is unable to
	interpret the form-feed character.

3.24 The TITLE Directive

TITLE		<string constant>

	RASM-86 prints the string constant def ined by a TITLE directive
	statement at the top of each printout page in the listing file. The
	title character string can be up to 30 characters in length. For
	example,

TITLE		'DOS monitor'

3-11
Programmer's Utilities Guide	3.25 The INCLUDE Directive

3.25 The INCLUDE Directive

INCLUDE 	<filename>

	The INCLUDE directive includes another RASM-86 source file in
	the source text. For example,

INCLUDE EQUALS.A86

	You can use the INCLUDE directive when the source program is
	large and resides in several files. Note that you cannot nest
	INCLUDE directives; that is, a source file called by an INCLUDE
	directive cannot contain another INCLUDE directive.

	If the file named in the INCLUDE directive does not have a
	filetype, RASM-86 assumes the filetype to be A86. If you do not
	specify a drive name with the file, RASM-86 assumes the drive
	containing the source file.

End of Section 3

3-12
	Section 4
The RASM-86 Instruction Set

4.1 Introduction

	The RASM-86 instruction set includes all 8086 machine
	instructions. Section 2.7 gives the general syntax for instruction
	statements. The following sections define the specific syntax and
	required operand types for each instruction without reference to
	labels or comments. The instruction definitions are presented in
	tables for easy reference.

	For a more detailed description of each instruction, see the
	Intel MCS-86 Assembly Language Reference Manual. For descriptions
	of the instruction bit patterns and oFe~rations, see the Intel
	MCS-86 User's Manual.

	The instruction definition tables present RASM-86 instruction
	statements as combinations of mnemonics and operands. A mnemonic is
	a symbolic representation for an instruction; its operands are its
	required parameters. Instructions can take zero, one, or two
	operands. When two operands are specified, the left operand is the
	instruction's destination operand, and the two operands are
	separated by a comma.

	The instruction definition tables organize RASM-86 instructions
	into functional groups. In each table, the instructions are listed
	alphabetically. Table 4-1 shows the symbols used in the instruction
	definition tables to define operand types.

Table 4-1. Operand Type Symbols
Symbol -T			Operand Type
numb			any numeric expression
numb8			any numeric expression that evaluates to
	an B-bit number
acc			accumulator register, AX or AL
reg			any general purpose register that is not a
	segment register
reg16			a 16-bit general purpose register that is
	not a segment register

segreg			any segment register:	CS, DS, SS, or ES

4-1
Programmer's Utilities Guide	4.1 Introduction

	Table 4-1.		(continued)
Symbol		Operand Type
mem	any address expression with or without
	base- and/or index-addressing modes, such
	as:
	variable
	variable+3
	variable[bx]
	variable[SI]
	variable[BX+SI]
	[BXI
	[BP+DII

simpmem	any address expression without base- and
	index-addressing modes, such as:

	variable
	variable+4
mem1reg	any expression symbolized by reg or mem
memlregl6	any expression symbolized by mem1reg, but
	must be 16 bits
label -	any address expression that evaluates to a
	label
lab8	any label that is within +/- 128 bytes
	distance from the instruction

	The 8086 CPU has nine single-bit Flag registers that reflect
	the state of the processor. You cannot access these registers
	directly, but you can test them to determine the effects of an
	executed instruction upon an operand or register. The effects of
	instructions on Flag registers are also described in the
	instruction-def inition tables, using the symbols shown in Table 4-2
	to represent the nine Flag registers.'

Table 4-2. Flag Register Symbols

	Symbol		Meaning
	AF	Auxiliary Carry Flag
	CF	Carry Flag
	DF	Direction Flag
	IF	Interrupt Enable Flag
	OF	overflow Flag
	PF	Pirity Flag
	SF	Sign Flag
	TF	Trap Flag
	ZF	Zero Flag

4-2
Programmer's Utilities Guide		4.2 Data Transfer Instructions

4.2 Data Transfer instructions

There are four classes of data transfer operations:

general purpose
accumulator specific
address-object
flag

Only SARF and POPP affect flag settings. Note in Table 4-3 that if
acc - AL, a byte is transferred, but if acc - AX, a word is
transferred.

Table 4-3. Data Transfer Instructions

Syntax		Result

IN			acc,numb8	transfer	data from input port
		given by numb8 (0-255)		to
		accumulator
IN			acc,DX	transfer	data from input port
		given		by DX register (O-OFFFFH)
		to accumulator
LAHP				tr ansf er f lags to the	AH
		register
LDS			regl6,mem	transfer	the segment part of the
		memory address		(DWORD variable)
		to the DS		segment register;
		transfer		the offset part to a
		general purpose		16-bit register
LEA			regl6,mem	transfer the offset of	the
		memory address to a		16-bit
		register
LES			regl6,mem	transfer	the segment part of the
		memory address to the		ES
		segment		register; transfer the
		offset		part to a 16-bit general
		purpos~e register
MOV			reg,memlreg	move memory or register	to
		register
MOV			mem1reg,reg	move register	to memory or
		register
MOV			memlreg,numb	move	immediate data to memory or
		register
MOV			segreg,memiregl6	move memory or register	to
		segment register
		4-3
Programiner's Utilities Guide	4.2 Data Transfer Instructions

Table 4-3. (continued)

Syntax	Result

MOV	memiregl6,segreg		move segment register to memory
		or register

OUT	numb8,acc	transfer data from accumulator
		to output port (0-255) given by
		numb8
OUT	DX,acc	transfer data from accumulator
		to output port (O-OFFFFH) given
		by DX register
POP	memjregl6	move top stack element to memory
		or register
POP	segreg	move top stack element to
		segment register; note that CS
		segment register is not allowed
POPF		transfer top stack element to
		flags

PUSH	meml,regl6	move	memory or ' register to top
		stack element
PUSH	segreg	move segment register	to top
		stack element
PUSHF			transfer flags	to top stack
		element
SAHF		transfer the AH register	to
		flags
XCHG	reg,mem1reg	exchange	register and memory or
		register
XCHG	mem1reg,reg	exchange memory or	register and
		register
XLAT	mem1reg	perform t a b I e	1 o o k u p
		translation, table	given by
		mem1reg,	which is always BX.
		Replaces	AL with AL offset from
		BX.

4.3 Arithmetic, Logical, and Shift instructions

	The 8086 CPU performs the four basic mathematical operations in
	several ways. It supports both 8- and 16-bit operations and also
	signed and unsigned arithmetic.
Programmer's Utilities Guide		4.3 Arithmetic Instructions

	Six of the nine flag bits are set or cleared by most arithmetic
	operations to reflect the result of the operation. Table 4-4
	summarizes the effects of arithmetic instructions on flag bits.
	Table 4-5 defines arithmetic instructions. Table 4-6 defines
	logical and shift instructions.

Table 4-4. Effects of Arithmetic instructions on Flags
Flag Bit 7		Result
	CF		is	set if the operation results in a carry
		out of (from addition)		or a borrow into
		(from subtraction)		the high-order bit of the
		result; otherwise CF is cleared.
	AF		is	set if the operation results in a carry
		out of (from addition) or a borrow		into
		(from	subtraction) the low-order four bits
		of the result; otherwise AF is cleared.
	ZF		is	set if the result of the operation is
		zero; otherwise ZF is cleared.
	SF		is set if the result is negative.
	PF		is	set if the modulo 2 sum of the low-order
		eight	bits of the result of the operation is
		0 (even parity);		otherwise PF is cleared
		(odd parity).
	OF		is set if the operation results	in an
		overflow;		the size of the result exceeds the
		capacity of its destination.

Table 4-5. Arithmetic Instructions

Syntax		Result

AAA			adjust unpacked BCD (ASCII) for
		addition - adjusts AL
AAD			adjust unpacked BCD (ASCII) for
		division - adjusts AL
AAM			adjust unpacked BCD (ASCII) for
		multiplication - adjusts AX
AAS			adjust unpacked BCD (ASCII) for
		subtraction - adjusts AL
ADC			reg,mem1reg	add (with carry) memory or
		register to register
		4-5
Programmer's Utilities Guide	4.3 Arithmetic Instructions

Table 4-5. (continued)

Syntax	Result

ADC	mem1reg,reg	add (with carry)	register to
		memory or register
ADC	memireg,numb	add	(with carry) immediate data
		to memory or register
ADD	reg,memlreg	add memory or register	to
		register
ADD	mem1reg,reg	add register to memory	or
		register
ADD	memireg,numb	add immediate data	to memory or
		register
CBW		convert	byte in AL to word in
		AX by sign extension
CMP	reg,memlreg	compar e memor y or	r eg i s ter wi th
		register
CMP	mem1reg,reg	compare register with memory or
		register
CMP	memlreg,numb	compare data	constant with
		memory or register
CWD		convert	word in AX to double
		word in DX/AX by	sign
		extension
DAA		decimal	adjust for addition,
		adjusts AL
DAS		decimal adjust for	subtraction,
		adjusts AL
DEC	mem1reg	subtract 1 from memory	or
		register
DIV	memireg	divide	(unsigned) accumulator
		(AX or AL) by memory	or
		register.	If byte results, AL
		- quotient, AH =	remainder.
		if word results, AX
		quotient, DX - remainder
IDIV	mem1reg	divide	(signed) accumulator (AX
		or	AL) by memory or register -
		quotient	and remainder stored
		as in DIV
		4-6
Programmer's Utilities Guide		4.3 Arithmetic instructions

Table 4-5. (continued)

Syntax		Result

IMUL			mem1reg	multiply (signed) memory or
		register by accumulator (AX or
		AL). If byte, results in AH,
		AL. If word, results in DX,
		AX.
INC			mem1reg	add 1 to memory or register
KUL			mem1reg	multiply (unsigned) memory or
		register by accumulator (AX or
		AL). Results stored as in
		IMUL.
NEG			mem1reg	two's complement memory or
		register
SBB			reg,memlreg	subtract (with borrow) memory
		or register from register
SBB			mem1reg,reg	subtract (with borrow) register
		from memory or register
SBB			memlreg,numb	subtract (with borrow)
		immediate data from memory or
		register
SUB			reg,memlreg	subtract memory or register
		from register
SUB			mem1reg,reg	subtract register from memory
		or register
SUB			memlreg,numb	subtract data constant from
		memory or register

Table 4-6. Logical and Shift Instructions

Syntax		Result

AND			reg,memlreg	perform bitwise logical AND of
		a register and memoryor
		register
AND			mem1reg,reg	perform	bitwise logical AND of
		memory or register		and
		register
AND			memlreg,numb	perform	bitwise logical AND of
		memory or register		and data
		constant
		4-7
Programmer's Utilities Guide	4.3 Arithmetic Instructions

Table 4-6. (continued)

Syntax	Result

NOT	mem1reg	form one Is complement of memory
		or register
OR	reg,memireg	perform	bitwise logical OR of a
		register and memory	or
		register
OR	mem1reg,reg	perform	bitwise logical OR of
		memory or register	and
		register
OR	memlreg,numb	perform	bitwise logical OR of
		memory or register	and data
		constant
RCL	mem1rej,l	rotate memory or	register 1 bit
		left through carry flag
RCL	memlreg,CL	rotate	memory or register left
		through	carry flag, number of
		bits given by CL register
RCR	memireg,l	rotate memory or	register 1 bit
		right through carry flag
RCR	memireg,CL	rotate memory or	register right
		through	carry flag, number of
		bits given by CL register
ROL	memireg,l	rotate memory or	register 1 bit
		left
ROL	memlreg,CL	rotate memory or	register lef t,
		number of	bits given by CL
		register
ROR	memlreg,l	rotate memory or	register 1 bit
		right
ROR	memlreg,CL	rotate memory or	register
		right,	number of bits given by
		CL register
SAL	memireg,l	shift	memory or register 1 bit
		left,	shift in low-order zero
		bit
SAL	memlreg,CL	shift memory	or register left,
		number of	bits given by CL
		register,	shift in low-order
		zero bits
		4-8
Programmer's Utilities Guide		4.3 Arithmetic Instructions

Table 4-6. (continued)

Syntax		Result

SAR				mem1reg,1	shift memory or register 1 bit
		right,			shift in high-order bit
		equal to the original high
		order bit
SAR				memireg,CL	shift memory or register right,
		number of bits given by CL
		register, shift in high-order
		bits			equal to the original
		high-order bit
SHL				memlreg,l	shift	memory or register 1 bit
		left, shift in low-order zero
		bit.			Note that SHL	is a
		different mnemonic for SAL.
SHL				memlreg,CL	shiftmemoryor register left,
		number of bits given by CL
		register, shift in low-order
		zero bits. Note that SHL is a
		different mnemonic for SAL.
SHR				memlreg,l	shift	memory or register 1 bit
		right,			shift in	high-order
		zero bit
SHR				memireg,CL	shift memory or register right,
		number of bits given by CL
		register, shift in high-order
		zero bits
TEST				reg,mem1reg	perform bitwise logical AND of
		a			register and memory or
		register - set condition flags
		but do not change destination.
TEST				mem1reg,reg	perform bitwise logical AND of
		memory			or register	and
		register			- set	condition
		flags,			but do not	change
		destination.
TEST				memireg,numb	perform bitwise logical AND of
		memory or register		and data
		constant - set condition flags
		but do not change destination.
		4-9
Programmer's Utilities Guide	4.3 Arithmetic Instructions

Table 4-6. (continued)

Syntax	Result

XOR	reg,memlreg	perf orm	bitwise logical
		exclusive OR of a register and
		memory or register
XOR	mem1reg,reg	perform	bitwise logical
		exclusive	OR of memory or
		register	and register
XOR	memlreg,numb	perform	bitwise logical
		exclusive	OR of memory or
		register and data constant

4.4 String Instructions

	String instructions take zero, one, or two operands. The
	operands specify only the operand type, determining whether the
	operation is on bytes or words. If there are two operands, the
	source operand is addressed by the SI register and the destination
	operand is addressed by the DI register. The DI and SI registers
	are always used for addressing. Note that for string operations,
	destination operands addressed by DI must always reside in the Extra
	Segment (ES).

	The source operand is usually addressed by the DS register.
	However, you can designate a different register by using a segment
	override prefix. For example,

MOVS	WORD PTR[DII, CS:WORD PTR[SIJ

Table 4-7. String Instructions

Syntax 	Result

CMPS memlreg,memireg		subtract source f rom
destination, affect flags, but
do not return result

CMPSB	an alternate mnemonic for CMPS
	that assumes a byte operand
CMPSW	an alternate mnemonic for CMPS
	that assumes a word operand

LODS	mem1reg	transfer a byte or word from
		the source operand to the
		accumulator
LODSB			an alternate mnemonic for LODS
		that assumes a byte operand
		4-10
Programmer's Utilities Guide		4.4 String Instructions

Table 4-7. (continued)

Syntax			T	Result

LODSW				an	alternate mnemonic for LODS
		that assumes a word operand
MOVS			memlreg,memlreg	move I byte (or word)	from
		source to destination
MOVSB				an	 alternate mnemonic for MOVS
		that assumes a byte operand
MOVSW				an	 alternate mnemonic for MOVS
		that assumes a word operand
SCAS			mem1reg	subtract	destination operand
		from accumulator		(AX or AL) ,
		affect flags, but do		not
		return result
SCASB				an	 alternate mnemonic for SCAS
		that assumes a byte operand
SCASW				an	 alternate mnemonic for SCAS
		that assumes a word operand
STOS			memireg	transfer	a byte -or word from
		accumulator		to the destination
		operand
STOSB				an	alternate mnemonic for STOS
		that assumes a byte operand
STOSW				an	alternate mnemonic for STOS
		that assumes a word operand

Table 4-8 defines prefixes for string instructions. A prefix
repeats its string instruction the number of times contained in
the CX register, which is decremented by 1 for each iteration.
Prefix mnemonics precede the string instruction mnemonic in the
statement line.

4-11
Programmer's Utilities Guide	4.4		String Instructions

Table 4-8. Prefix Instructions

	Syntax		Result
	REP	repeat until CX register is zero
	REPE	repeat until CX register is zero, and
		zero flag (ZF) is not zero
	REPNE	repeat until CX register is zero, and
		zero flag (ZF) is zero
	REPNZ	equal to REPNE
	REPZ	equal to REPE

4.5 Control Transfer Instructions

There are four classes of control transfer instructions:

 calls, jumps, and returns
 conditional jumps
 iterational control
 interrupts

	All control transfer instructions cause program execution to
	continue at some new location in memory, possibly in a new code
	segment. The transfer can be absolute, or it can depend upon a
	certain condition. Table 4-9 defines control transfer instructions.
	In the definitions of conditional jumps, above and below refer to
	the relationship between unsigned values. Greater than and less
	than refer to the relationship between signed values.

4-12
Prograrmner's Utilities Guide 4.5 Control Transfer Instructions

Table 4-9. Control Transfer Instructions
Syntax			T	Result
CALL			label	push the offset address of the
		next instruction on the stack,
		jump to the target label
CALL			memJregl6	push the offset address of the
		next instruction on the stack,
		jump to location indicated by
		contents of specified memory
		or register

CALLF label		push CS segment register on the
	stack, push the offset address
	of the next instruction on the
	stack (after CS), jump to the
	target label
CALLF mem		push CS register on the stack,
	push the offset address of the
	next instruction on the stack,
	jump to location indicated by
	contents of specified double
	word in memory

INT			numb8	push the flag registers (as in
		PUSHF), clear TF and IF flags,
		transfer control		with an
		indirect call through any one
		of the 256		inter rupt-vector
		elements - uses three levels
		of stack
INTO				if OF (the overflow flag) is
		set, push the flag registers
		(as in PUSHF) , clear TF and IF
		flags, transfer control with
		an indirect call through
		interrupt-vector		element 4
		(location 10H) .		If the OF
		flag is cleared, no operation
		takes place
IRET				transfer control to the return
		address saved by a previous
		interrupt operation, restore
		saved flag registers, as well
		as CS and IP.		Pops three
		levels of stack
		4-13
Programmer's Utilities Guide	4.5 Control Transfer Instructions

Table 4-9. (continued)

	Syntax		Result
JA			lab8	jump	if "not below or equal" or
			n above" 	( (CF or ZF)=O )
JAE	lab8	jump if "not below" or "above
		or equal" ( CF-0 )
JB	lab8	jump if "below" or "not above
		or equal" ( CF=l )
JBE	lab8	jump if "below or equal" or
		"not above" ((CF or Zr)=l
ic	lab8	same as JB

JCXZ	labB	jump to target label	if CX
		register is zero
JE	lab8	jump if "equal" or	"zero"
		( ZF=l )
JG	lab8	jump	if "not less or equal" or
		"greater" (SP xor OF)	or
		ZF)=O )
JGE	lab8	jump	if "not less" or "greater
		or equal" HSF xor OF)=O )
JL	lab8	jump	if "less" or "not greater
		or equal" ((SF xor OF)=l
JLE	labB	jump	if "less or equal" or "not
		greater" (((SF xor OF)	or
		ZF)-l )
imp	label	jump to the target label
imp	mem1regl6	jump	to location indicated by
		contents of	specified memory
		or register
JMPF	label	jump to the target	label
		possibly in another	code
		segment
JKPS	lab8	jump to	the target label within
		128	bytes f rom instruction
JNA	labB	same as JBE
JNAE	lab8	same as JB

4-14
Programmer's Utilities Guide		4.5 Control Transfer Instructions

Table 4-9. (continued)

	Syntax			Result
JNB					lab8	same as JAE

JNBE			lab8	same as JA
JNC			lab8	same as JNB
JNE			lab8	i ump if "not equal" or	"not
		zero" ( ZF-O
JNG			lab8	same as JLE
JNGE			lab8	same as JL
JNL			lab8	same as JGE
JNLE			lab8	same as JG
JNO			lab8	jump if "not overflow" ( OF-0
JNP			lab8	jump	if "not parity" or "parity
		odd" ( PF=O )
JNS			lab8	jump if "not sign" ( SF=O
JNZ			lab8	same as JNE
JO			lab8	jump if "overflow" ( OF-1
Jp			lab8	jump if "parity" or	"parity
		even" ( PF-1
JPE			lab8	same as JP
JPO			lab8	same as JNP
is			lab8	jump if "sign" ( SF=l
iz			lab8	same as JE
LOOP			lab8	decrement	CX register by one,
		jump		to target label if CX is
		not zero

LOOPE			lab8	decrement CX register by one,
		jump to target label if CX is
		not zero and the ZF flag is
		set - "loop while zero" or
		"loop while equal"
		4-15
Programmer's Utilities Guide	4.5 Control Transfer Instructions

Table 4-9. (continued)

Syntax	Result
LOOPNE		lab8	decrement CX register by one
		jump	to target label if CX is
		not zero and ZF flag	is
		cleared - "loop while	not
		zero" or "loop while	not
		equal"
LOOPNZ		labB	same as LOOPNE
LOOPZ	lab8	same as LOOPE
RET		return	to the address pushed by
		a	previous CALL instruction,
		increment 	stack pointer by 2

RET	numb	return to the address pushed by
		a previous CALL, increment
		stack pointer by 2+numb
RETF		return to the address pushed by
		a previous CALLF instruction,
		increment stack pointer by 4
RETF	numb	return to the address pushed by
		a previous CALLF instruction,
		increment stack pointer by
		4+numb

4.6		Processor Control Instructions

	Processor control instructions manipulate the flag registers.
	Moreover, some of these instructions synchronize the 8086 CPU with
	external hardware.

Table 4-10. Processor Control Instructions

Syntax	Results
CLC	clear CF flag

CLD	clear DF flag, causing string
	instructions to auto-increment
	the operand registers
CLI	clear	IF flag, disabling
	maskable external interrupts
		4-16
Programmer's Utilities Guide 4.6 Processor Control Instructions

Table 4-10. (continued)

Syntax		Results

CMC					complement	CF flag
ESC				numbB,memlreg	do	no operation other	than
		compute the effective address
		and place it on the address
		bus			(ESC is used by the 8087
		numeric coprocessor.)		numb8
		must be in the range 0 - 63
HLT					cause 8086 processor to enter
		halt			state until an interrupt
		is recognized
LOCK					PREFIX instruction, cause the
		8086 processor to assert the
		bus-lock signal for		the
		duration			of the operation
		caused			by the following
		instruction. The LOCK prefix
		instruction can precede any
		other			instruction.	Bus-lock
		prevents coprocessors		from
		gaining			the bus; this	is
		useful for shared-resource
		semaphores

NOP				no operation is performed
STC				set CF flag
STD				set DF flag,	causing string
		instructions		to auto-decrement
		the operand registers
STI				set	IF flag, enabling maskable
		external interrupts
WAIT				cause the 8086 processor	to
		enter a wait state if		the
		signal		on its TEST pin is not
		asserted
	End of Section 4

4-17

1_~
	Section 5
Code-macro Facilities

5.1 Introduction to Code-macros

	RASM-86 does not support traditional assembly language macros,
	but it does allow you to def ine your own instructions using the
	Code-macro directive. RASH-86 assembles code-macros wherever they
	appear in assembly language code, but there the similarity to
	traditional macros ends.

	Traditional assembly- language macros contain assembly-language
	instructions, but a RASK-86 code-macro contains only code-macro
	directives. Traditional assembly language macros are usually
	defined in the Symbol Table; RASM-86 code-macros are defined in the
	assembler's internal Symbol Table.

	A traditional macro simplifies the repeated use of the same
	block of instructions throughout a program, but a code-macro sends a
	bit stream to the output file, and in effect adds a new instruction
	to the assembler.

	RASM-86 treats a code-macro as an instruction, so that you can
	invoke code-macros by using them as instructions in your program.
	The following example shows how to invoke MYCODE, an instruction
	defined by a code-macro.

XCHG		BX,WORD3
MYCODE		PARM1,PARM2
MUL		AX,WORD4

	Note that MYCODE accepts two operands that are its formal
	parameters. When you define MYCODE, RASH-86 classifies these two
	operands as to type, size, etc. The names of formal parameters are
	not fixed, so RASM-86 replaces them with the names or values
	supplied as operands when you invoke the code-macro. The formal
	parameters are placeholders that indicate where and how the operands
	are to be used.

5-1
Programmer's Utilities Guide	5.1		Introduction to Code-macros

A code-macro definition takes the general form:

Code-Macro <name> [<formal parameter list>]
code-macro body
EndM

where the optional <formal parameter list> is defined:

<formal name>:<specifier letter>[<modifier letter>1[<range>]

	If you specify a formal parameter list, the specifier letter is
	required but the modifier letter is optional. Possible specifiers
	are A, C, D, E, M, R, S, and X. Possible modifier letters are b, d,
	w, and sb. RASM-86 ignores case except within strings, but for
	clarity, this section shows specifiers in upper-case and modifiers
	in lower-case. Following subsections describe specifiers,
	modifiers, and the optional range in greater detail.

	The body of the code-macro describes the bit pattern and formal
	parameters. Only the following directives are legal within code
	macros:

SEGFIX
NOSEGFIX
MODRM
RELB
RELW
DB
DW
DD
DBIT

	These directives are unique to code-macros. The code-macro
	directives DB, DW, and DD that appear to duplicate RhSM-86
	directives DB, DW, and DD have different meanings in code-macro
	context. These directives are discussed in detail in Section 5.5.5.

	CodeMacro, EndM, and the code-macro directives are all reserved
	words. The formal definition syntax for a code-macro is defined in
	Backus-Naur-like form in Appendix D. The following examples are
	typical code-macro definitions.

CodeMacro AAA
DB 37H
EndM

CodeMacro DIV divisor:Eb
	SEGFIX		divisor
	DB	6FH
	MODRM		divisor
EndM

5-2
Programmer's Utilities Guide		5.1 Introduction to Code-macros

CodeMacro ESC opcode:Db(0,63),Src:Eb
	SEGFIX src
	DBIT 5(lBH),3(opcode(3))
	MODRM opcode,src
EndM

5.2 Specifiers

	Every formal parameter must have a specifier letter that
	indicates what type of operand is needed to match the formal
	parameter. Table 5-1 defines the eight possible specifier letters.

Table 5-1. Code-macro operand Specifiers

Letter			Operand Type
	A			Accumulator register, AX or AL.
	C			Code, a label expression only.
	D			Data, a number used as an immediate value.
	E			Effective address, either an M (memory
		address) or an R (register).
	M			Memory address.	This can be either a variable
		or a bracketed register expression.
	R			A general register only.
	S			Segment register only.
	X			A direct memory reference.

5.3 Modifiers

	The optional modifier letter is a further requirement on the
	operand. The meaning of the modifier letter depends on the type of
	the operand. For variables, the modifier requires the operand to be
	of type b for byte, w for word, d for double-word, and sb for signed
	byte. For numbers, the modifiers require the number to be of a
	certain size: b for -256 to 255 and w for other numbers. Table 5-2
	summarizes code-macro modifiers.

5-3
Programmer's Utilities Guide	5.3 Modifiers

Table 5-2. Code-macro Operand Modifiers

	Variables		Numbers
modifier	Type	Modifier	Size

b	byte	b	-256 to 255
w	word	w	anything else
d	dword
sb	signed
	byte

5.4 Range Specifiers

	The optional range is specified within parentheses by either
	one expression or two expressions separated by a comma. The
	following are valid formats:

(numberb)
(register)
(numberb,numberb)
(numberb,register)
(register,numberb)
(register,register)

	Numberb is an 8-bit number, not an address. The following
	example specifies that the input port must be identified by the DX
	register:

CodeMacro IN dst:Aw,port:Rw(DX)

The next example specifies that the CL register is to contain the
count of rotation:

CodeMacro ROR dst:Ew,count:Rb(CL)

The last example specifies that the opcode is to be immediate data,
and can range from 0 to 63 inclusive:

CodeMacro ESC opcode:Db(0,63),adds:Eb

5.5 Code-macro Directives

	Code-macro directives define the bit pattern and make further
	requirements on how the operand is to be treated. Directives are
	reserved words, and those that appear to duplicate assembly language
	instructions have different meanings within a code-macro definition.
	only the nine directives defined here are legal within code-macro
	definitions.

5-4
Programmer's Utilities Guide		5.5 Code-macro Directives

5.5.1 SRWIX

	SEGFIX instructs RASM-86 to determine whether a segment
	override prefix byte is needed to access a given memory location.
	If so, it is output as the first byte of the instruction. If not,
	RASM-86 takes no action. SEGFIX has the form:

SEGFIX <formal name>

where <formal name> is the name of a formal parameter that
represents the memory address. Because it represents a memory
address, the formal parameter must have one of the specifiers E, M,
or X.

5.5.2 NOSEGFIX

	Use NOSEGFIX for operands in instructions that must use the ES
	register for that operand. This applies only to the destination
	operand of these instructions: CMPS, MOVS, SCAS, STOS. NOSEGFIX has
	the form:

NOSEGFIX 		segreg,<formname>

where segreg is one of the segment registers ES, CS, SS, or DS, and
<formname> is the name of the memory-address formal parameter that
must have a specifier E, M, or X. No code is generated from this
directive, but an error'check is performed. The following is an
example.of NOSEGFIX use:

CodeMacro MOVS si_ptr:Ew,di_ptr:Ew
	NOSEGFIX		ES,di ptr
SEGFIX			si 	r
			_ptY
	DB			OA5H
	EndM

5.5.3 MODRK

	This directive instructs RASM-86 to generate the MODRM byte
	that follows the opcode byte in many of the 8086's instructions. The
	MODRM byte contains either the indexing type or the register number
	to be used in the instruction. It also specifies which register is
	to be used, or gives more information to specify an instruction.

	The MODRM byte carries the information in three fields. The
	mod field occupies the two most significant bits of the byte, and
	combines with the register memory field to form 32 possible values:
	8 registers and 24 indexing modes.

	The reg field occupies the three next bits following the mod
	field. It specifies either a register number or three more bits of
	opcode information. The meaning of the reg field is determined by
	the opcode byte.

5-5
Programmer's Utilities Guide	5.5		Code-macro Directives

	The register memory field occupies the last three bits of the
	byte. It specifies a register as the location of an operand, or
	forms a part of the address-mode in combination with the mod field
	described above.

	For further information about the 8086's instructions and their
	bit patterns, see the Intel 8086 Assembly Language Programming
	Manual and the Intel 8086 Fai-ilyUser's Manual. MODRM has the
	forms:

MODRM		<form name>,<form name>
MODRM		NUMBER7,<form name>

where NUMBER7 is a value 0 to 7 inclusive, and <form name> is the
name of a formal parameter. The following examples show how to use
MODRM:

CodeMacro RCR		dst:Ew,count:Rb(CL)
	SEGFIX	dst
	DB	OD3H
	MODRM	3,dst
EndM

CodeMacro OR dst:Rw,src:Ew
	SEGFIX	src
	DB	OBH
	MODRM	dst,src
EndM

5.5.4 RFJ.B and RELN

	These directives, used in IP-relative branch instructions,
	instruct RASM-86 to generate a displacement between the end of the
	instruction and the label that is supplied as an operand. RELB
	generates one byte and RELW two bytes of displacement. The
	directives have the following forms:

RELB <form name>
RELW <form name>

where <form name> is the name of a formal parameter with a C (code)
specifier. For example,

CodeMacro LOOP place:Cb
	DB	OE2H
	RELB	place
EndM

5-6
Programmer's Utilities Guide	5.5 Code-macro Directives

5.5.5 DB, DW, and DD

	These directives differ from those that occur outside code
	macros. The directives have the following forms:

DB <form name> NUMBERB
DW <form name> NUMBERW
DD <form name>

where NUMBERB is a single-byte number; NUMBERW is a two-byte number,
and <form name> is a name of a formal parameter. For example,

CodeMacro XOR dst:Ew,src:Db
	SEGFIX	dst
	DB	81H
	MODRM	6,dst
	DW	src
EndM

5.5.6 DBIT

	This directive manipulates bits in combinations of a byte or
	less. The form is

	DBIT <field description>[,<field description>]
	where a <field description>, has two forms:

<number><combination>
<number>(<form name>(<rshift>))

where <number> ranges from 1 to 16, and specifies the number of bits
to be set. <combination> specifies the desired bit combination.
The total of all the <number>s listed in the field descriptions must
not exceed 16.

	The second form shown above contains <form name>, a formal
	parameter name that instructs the assembler to put a certain number
	in the specified position. This number normally refers to the
	register specified in the first line of the code-macro. The numbers
	used in this special case for each register are:

AL: 0
CL: 1
DL: 2
BL: 3
AH: 4
CH: 5
DH: 6
BH: 7
AX: 0
CX: 1
DX: 2

5-7

lo-I
Programmer's Utilities Guide	5.5 Code-macro Directives

BX: 3
SP: 4
BP: 5
SI: 6
DI: 7
ES: 0
CS: 1
SS: 2
DS: 3

	<rshift>, which is contained in the innermost parentheses,
	specifies a number of right shifts. For example, 0 specifies no
	shift; 1 shifts right one bit; 2 shifts right two bits, and so on.
	The definition below uses this form.

CodeMacro DEC dst:Rw
	DBIT 5(9H),3(dst(O))
Endm

	The first five bits of the byte have the value 9H. If the
	remaining bits are zero, the hex value of the byte is 48H. If the
	instruction

DEC 	DX

is assembled, and DX has a value of 2H, then 48H + 2H = 4AH, which
is the final value,of the byte for execution. If this sequence is
present in the definition

DBIT 5(9H),3(dst(l))

then the register number is shifted right once, and the result is
48H + lH = 49H, which is erroneous.

End of Section 5

5-8
Section 6
XREF-86

6.1 Introduction

	XREF-86 is an assembly language cross-reference utility program
	that creates a cross-reference file showing the use of symbols
	throughout the program. XREP-86 accepts two input files created by
	RASM-86. XREF-86 assumes these input files have the filetypes of
	LST and SYM respectively, and they both reside on the same disk
	drive. XREF-86 creates one output file with the filetype XRF.
	Figure 6-1 illustrates XREF-86 operation.

FILENAME LST
LISTING FIL T::~
LS
F ~IL E:

XREF-86		FILENAME.XRF
	CROSS-REFERENCE FILE
FILENAM
	SYM
SYMBOL TABLE FILE~-

Figure 6-1. XREF-86 operation

6.2 Invoking XREP-86

Invoke XREF-86 with the command form:

XREF86 <filename>

	XREF-86 reads <filename>.LST line by line, attaches a line
	number prefix to each line, and writes each prefixed line to the
	output file, <filename>.XRF. During this process, XREF-86 scans
	each line for any symbols that exist in the file <filename>.SYM.

	After completing this copy operation, XREF-86 appends to
	<filename>.XRF a cross-reference report that lists all the line
	numbers where each symbol in <filename>.SYM appears. XREF-86 flags
	with a # character each line number reference where the referenced
	symbol is the first token on the line.

6-1
Programmer's Utilities Guide	6.2 invoking XREF-86

	XREF-86 also lists the value of each symbol, as determined by
	RhSM-86 and placed in the Symbol Table file, <filename>.SYM.

	. When you invoke XREF-86, you can include an optional drive
	specification with the filename. When you invoke XREF-86 with a
	drive name preceding the <filename>, it searches for the input files
	and creates the output file on the specified drive. Otherwise,
	XREF-86 associates the files with the default drive.

	XREF-86 also allows you to direct the output file to the
	default list device instead of to <filename>.XRF. To redirect the
	output, add the string $p to the command line. For example,

A>xref86 bios $p

End of Section 6

0

6-2
Section 7
LINK-86

7.1 introduction

	LINK-86 is the Digital Research linkage editor that combines
	relocatable object files into a file that runs under DOS. The
	object files can be produced by Digital Research's 8086 language
	translators such as RASM-86, PL/I-86 TIA . and CB86 TIA I or by other
	translators that produce object files using a compatible subset of
	the Intel 8086 object module format.

	LINK-86 accepts two types of object files. The first type is
	an object file containing a single object module. This type
	generally has the filetype OBJ, and is produced by a language
	translator. The second type is a library file which is an indexed
	library of object modules. A library file has a filetype L86, and
	is generated by the library manager, LIB-86, in the Intel 8086
	object module format. LINK-86 can search such a library file and
	select only those modules needed by the other programs being linked.

LINK-86 produces three files:

 A Run (EXE) File
 A Symbol Table (SYM) File
 A Map (MAP) File

	The EXE file contains a memory image of the program that runs
	directly under DOS. The SYM file contains a list of symbols from the
	object files, and their offsets, and is suitable for use with a
	symbolic instruction debugger. The MAP file contains information
	about the layout of the EXE file.

	LINK-86 displays any unresolved symbols at the console.
	Unresolved symbols are those that have been referenced but not
	defined in the files being linked. These symbols must be resolved
	before the program will run properly.

	Upon completion of processing, LINK-86 displays the size of
	each of the sections of the EXE file, and the Use Factor, which is a
	decimal percentage indicating the amount of available memory used by
	LINK-86.

Figure 7-1 illustrates LINK-86 operation.

7-1
Programmer's Utilities Guide	7.1 		Introduction
	OBJ 1 (OBJECT FILE)
			EXE (RUN F=1LAE)
	OBJ N (OBJECT FILE)		OR Y FILE)
			OVR (OVERL Y FILE)
		dila

L86 1 (LIBRARY FILE)
	SYM
	LINK-86
		(SYMBOL TABLE FILE)
L86 N (LIBRARY FILE)

L-0-	MAP (MAP FILE)

NPUT COMMAND FILE~)

Figure 7-1. LINK-86 Operation

7.2 Invoking LINK-86

You invoke LINK-86 with a command of the form:

LINK86 ifile -1 filel 1,file2,...,filenj

	If you enter a filename to the left of the equal sign, LINK-86
	creates the output files with that name and the appropriate
	filetypes. For example, the command

A>1ink86 nyfile - parta,partb,partc

creates MYFILE.EXE and MYFILE.SYM.

	If you omit the new filename, LINK-86 creates the output files
	using the first filename in the command line. For example, the
	command

	A>link86 parta,partb,partc
	creates the files PARTA.EXE and PARTA.SYM.

7-2
Programmer's Utilities Guide			7.2	Invoking LINK-86

	You can also instruct LINK-86 to read its command line from a
	file, thus making it possible to store long or commonly used link
	commands on the disk (see Section 7.10).

7.3 Definitions

	This section uses the following terms to describe how LINK-86
	processes object files and creates the EXE file.

Table 7-1. LINK-86 Definitions

Term		Description
Segment				A Segment is a collection of code or
	data bytes whose length is less		than
	64K. A segment is the smallest unit
	that LINK-86 manipulates when creating
	the EXE file.
Segment name*				A Segment name can be any valid RASM-86
	identifier.				LINK-86 combines	all
	segments				with	the same segment name
	from separate object files.
Class name*				A Class name can be any valid RASM-86
	identifier.				LINK-86 uses the class
	name to position the segment in		the
	correct section of the run file.
<Align type>*				The <Align type> indicates on what type
	of boundary the segment is to begin.
	The Align				types are byte, word,	and
	paragraph.				LINK-86 uses the align type
	in two ways:			first, when it combines
	parts of segments from separate files,
	and second, when it combines segments
	into groups				or sections of	the EXE
	file.

<Combine type>*		The <Combine type> determines how LINK
86 can combine parts of segments with
the same name from different files.
The Combine types are: public and
common.

Section			A section is one of up to four logical
	parts of an EXE file. A section can be
	any length but the total length of all
	sections must be less than or equal to
	one megabyte.
		7-3
Programmer's Utilities Guide	7.3 		Definitions

Table 7-1. (continued)
Term	I	Description

Group*	A Group is a collection of segments whose
	total length is less than 64K, and thus is
	addressable from a single segment register.
	Groups allow you to break up a program into
	segments, while still allowing the segments to
	be addressed without changing the contents of
	a segment register. This technique results in
	shorter and faster code than addressing
	segments with 32-bit pointers.

	If you program in a high-level language, the compiler
	automatically assigns the Segment name, Class name, Group, Align
	type, and combine type. If you program in assembly language, refer
	to Section 3 for a description of how to assign these attributes.

7.4 The Link Process

	The link process involves two distinct phases: collecting the
	segments in the object files, and then positioning them in the EXE
	file.

7.4.1 Phase 1 - Collection

	In Phase 1, LINK-86 first collects segments having the same
	Segment name and Class name from the separate files being linked,
	and then combines the segments according to the align and combine
	attributes.

	For example, suppose there are three object files, FILEA.OBJ,
	FILEB.OBJ, and FILEC.OBJ, and each file defines a segment named
	Dataseg with the statement:

dataseg 	dseg

	Figure 7-2 illustrates how LINK-86 combines this segment using
	the Public combine type.

DATASEG(C)

DATASEG(B) 	H

DATASEG(A)

Figure 7-2. Combining Segments with the Public Combine Type

7-4
Programmer's Utilities Guide			7.4	The Link Process

	LINK-86 combines these segments by concatenating the parts of
	the segments found in the separate object files with the appropriate
	space between the parts indicated by the Align type (see below) .
	Public is the most common Combine type, and RASH-86, as well as most
	high-level language compilers, produces it as a default.

	Figure 7-3 illustrates the Common Combine type. Suppose the
	three files FILEA.OBJ, FILEB.OBJ, and FILEC.OBJ each contain a
	segment named Dataseg defined with the statement;

dataseg		dseg common

	LINK-86 combines these segments so that all parts of the
	segments from the separate files being linked have the same low
	address in memory. Note that this corresponds to a common block in
	high-level languages.

DATASEG (A, B, C)
200H

Figure 7-3. Combining Segments with the Common Combine Type

	The Align type indicates on what type of boundary the segment
	begins, and thus determines the amount of space LINK-86 leaves
	between parts of segments of the same name. For example, suppose
	the three files FILEA.OBJ, FILEB.OBJ, and FILEC.OBJ each contain a
	segment named Dataseg. Figure 7-4 illustrates how LINK-86 uses the
	Align type to combine these segments.

7-5

I--,
Programmer's Utilities Guide	7.4		The Link Process

0-15
BYTES

0-15

DATASEG(A)

Figure 7-4. Combining Segments using the Align Type

	In Figure 7-4, the gap between the segments is determined by
	the Align type, and can be up to 15 bytes in length. For example,
	there is no gap if the Align type is byte. This produces the most
	compact code.

	If the Align type is word, LINK-86 adds a one-byte gap, if
	necessary, to ensure that the next part of the segment begins on a
	word boundary. Word is the default Align type for Data segments,
	since the 8086 processor performs faster memory accesses for word
	aligned data.

	The gap required for paragraph-aligned segments can be up to 15
	bytes.

	Figure 7-5 illustrates a specific example. Suppose the segment
	Dataseg has the paragraph Align type. Suppose also that Dataseg has
	a length of 129H in FILEA, 10EH in FILEB, and 13AH in FILEC. As
	shown, LINK-86 combines the segments to ensure that each segment
	begins on a paragraph boundary.

7-6
Programmer's utilities Guide			7.4	The Link Process

379H

	240H
	2 BYTES
	ZJUM
DATASEG(B)
	130H
	7 BYTES
	128H
DATASEG(A)
0

Figure 7-5. Paragraph Alignment

7.4.2 Phase 2 - Positioning

	In Phase 2, LINK-86 combines segments that are members of
	groups, again using the Align type to determine intersegment gaps.
	Figure 7-6 illustrates how LINK-86 combines segments into groups.

7-7
Programmer's Utilities Guide	7.4		The Link Process
	N,451 FF			N:64F

DATASEG3 (200H) VAR: 50			DATASEG3	VAR: 500
	t		, N+45:0			NA50
		N,10:34F		N:44F
	DATASEG2 (350H)		DATASEG2
		N-10:0		N:100
	DATASEG1 (100H)	N FF	DATASEG1	N-FF
		N:O		N:O

7-6a.		Segments Without Groups	7-6b. Segments Within A Group

Figure 7-6. The Effect of Grouping Segments

	In Figure 7-6, N:O is the base address where the segments are
	loaded at run-time (paragraph N, offset 0) . Figure 7-6a shows that
	each segment not contained in a group begins at offset zero, and
	thus can be up to 64K long. The offset of any given location, in
	this case the variable VAR, is relative to the base of the segment.
	Thus, in order to access the variable, VAR, at run-time, the program
	must load a segment register with the base of the segment Dataseg3
	because LINK-86 assigns VAR an offset of 50H.

	In Figure 7-6b, the same segments are combined in a group. The
	offsets of the segments are now cumulative and thus cannot extend
	past FFFFH. The offset of VAR is 500H relative to the base of the
	group. At run-time, the program does not need to change a segment
	register to point to Dataseg3, but can access VAR directly using the
	segment register that points to the base of the group.

	After combining segments into groups, LINK-86 assigns each
	segment to one of up to four logical sections of the EXE file as
	follows:

1)		Segments belonging to the group CGROUP are placed in the
CODE section of the EXE file.

7-8
Programmer's Utilities Guide		7.4 The Link Process

2)		Segments belonging to the group DGROUP are placed in the
DATA section of the EXE file. Note that the group names
CGROUP and DGROUP are automatically generated by PL/I-86,
CB86, and other high-level language compilers.

3)		If there are any segments that have not been processed
according to (1) and (2), LINK-86 places them in the EXE
file according to their class name, as shown in Table 7-1.
This table also shows the RASM-86 segment directives that
produce the class names as defaults.

4)		Segments that have not been processed by any of the above
means are omitted from the EXE file because LINK-86 does
not have sufficient information to position them.

	You can override the way LINK-86 positions segments by using
	command line options, as described in Section 7.7.

Table 7-2. LINK-86 Usage of Class Names
Class Name I EXE File Section I Segment Directive (RASM-86)

CODE		CODE	CSEG
DATA		DATA	DSEG
EXTRA			EXTRA 	ESEG
STACK			STACK	SSEG

7.5 LINK-86 Command Options

	When you invoke LINK-86, you can specify command line options
	that control the link operation. Each command option falls into one
	of several categories, depending on the type of file it affects.

	The first category of command options affects the contents of
	the EXE file, and therefore applies to the entire link operation.
	The second category of options af f ects the SYM and MAP files. These
	options act as toggles that turn on and off as LINK-86 processes the
	command line from left to right. The third category of options
	affects the Library and Input files, and therefore applies only to
	one file in the command line.

	Table 7-3 shows the LINK-86 command options including the
	abbreviation for each.

7-9
Programmer's Utilities Guide	7.5 LINK-86 Command Options

Table 7-3. LINK-86 Command Options

Option	Abbr	Meaning
CODE	C	controls contents of	CODE
		section of EXE file
DATA	D	controls contents of	DATA
		section of EXE file
EXTRA	E	controls contents of	EXTRA
		section of EXE file
STACK	ST	controls contents of	STACK
		section of EXE file
FILL	F	z e r o f ill a n d	include
		uninitialized 	data in EXE file
NOFILL	NOF	do not include uninitialized
		data in EXE file
NOPREFIX	NOP	do not generate prefix code at
		beginning of EXE file
INPUT	I	read command line f rom disk f ile
14AP	M	create a MAP file
LIBSYMS	LI	include symbols from library
		files in SYM file
NOLIBSYMS NOLI		do not include symbols from
library files in SYM file
LOCALS	LO	include local symbols in SYM
		file
NOLOCALS NOLO		do not include local symbols in
SYM file
SEARCH	S	search library and only link
		modules referenced

	You enclose command options in square brackets immediately
	following a filename. For example,

A>link86 testl [map], test2 [nolocals]

You can use spaces to improve the readability of the command line,
and you can put more than one option in square brackets by
separating them with commas. For example,

A>Iink86 testl (map, nolocals], test2 [locals]

	The following subsections describe the function and syntax for
	each of the command options.

7-10
Programmer's Utilities Guide			7.6	EXE File Options

7.6 EXE File Options

	The following command options affect the contents of the EXE
	file that LINK-86 creates:

CODE				DATA	STACK 	EXTRA

FILL		NOFILL

NOPREFIX

	Note that these options can appear after any filename in the
	command line.

	The first four options control the way LINK-86 places segments
	in the EXE file, and the contents of the EXE file header. The FILL
	and NOFILL options tell LINK-86 what to do with uninitialized data
	that can occur at the end of a section of the EXE file.

	when you link object modules created by a Digital Research
	canpiler such as CB86, or PL/1-86, the linkage editor generates some
	prefix code at the beginning of the EXE file. If you are linking
	RASM-86 modules only, you can use the NOPREFIX option and cause
	LINK-86 to suppress generation of this prefix code.

	Each of the options that affect the EXE file sections must be
	followed by one or more parameters enclosed in square brackets.
	Table 7-4 shows the parameters, their abbreviations, and meanings

Table 7-4. EXE File Option Parameters
Parameter			I Abbr	Meaning

ADDITIONAL			AD	additional memory allocation for the
		EXE file section

MAXIMUM				M	maximum	memory allocation for EXE
		file section

7.6.1 ADDITIONAL, MAXIMUM

	The ADDITIONAL and MAXIMUM parameters tell LINK-86 the values
	to place in the EXE file header. These parameters override the
	default values that LINK-86 usually uses. Each parameter is a
	hexadecimal number enclosed in square brackets. Table 7-5 shows the
	default values.

7-11
Programmer's Utilities Guide	7.6		EXE File Options

	The ADDITIONAL parameter indicates the amount of additional
	memory, in paragraphs, required by the indicated section of the EXE
	file. The program could use this memory for Symbol Table space or
	1/0 buffers that are needed at run-time, but are not included in the
	source program, and thus are not in the OBJ f ile. The MAXIMUM
	parameter indicates the maximum amount of memory needed by the
	indicated section of the EXE file. For example, the command

A>Iink86 test [data [add [1001,max [1000)]

Freates the file TEST.EXE whose header contains the following
information:

		The DATA section requires at least 100H paragraphs in addition
to the data in the EXE file.
		The DATA section can use up to 1000H paragraphs of memory.

	Table 7-5 summarizes the default values for each of the command
	options and parameters.

Table 7-5. Default Values for EXE File Options and Parameters
OPTIONIGROUP I CLASS_ISEGMENTI ADDITIONALIMAXIMUMIORIGIN

CODE	CGROUP		CODE	CODE	0	0	0
DATA	DGROUP		DATA	DATA	0	1000H*	100H
STACK		-	STACK	STACK	0	0	0
EXTRA		-	EXTRA	EXTRA	0	0	0

If there is a DGROUP; otherwise 0.

7.6.2 rILL/NOFILL

	The FILL and NOFILL options tell LINK-86 what to do with
	uninitialized data that can occur at the end of a section of the EXE
	file. The FILL option directs LINK-86 to include this uninitialized
	data in the EXE file, and fill it with zeros. The NOFILL option
	directs LINK-86 to omit the uninitialized data from the EXE file.
	The FILL option usually results in a larger EXE file, but the
	LINK-86 operation is usually faster when FILL is enabled. The
	default is FILL. Note that these options apply only to
	uninitialized data at the end of a section of the EXE file.
	Uninitialized data which is not at the end of a section is always
	zero filled and included in the EXE file.

7-12
Programmer's Utilities Guide			7.7	SYM File Options

7.7		SYN File Options

	The following command options affect the contents of the SYM
	file that LINK-86 creates:

LOCALS
LIBSYMS
NOLOCALS
NOLIBSYMS

	These options must appear in the command line after the
	specific file or files to which they apply. These options remain in
	effect until you change them, as LINK-86 processes the command line
	from left to right.

7.7.1 LOCALS/NOLOCM.S

	The LOCALS option directs LINK-86 to include local symbols in
	the SYM file if they are present in the object files being linked.
	The NOLOCALS option directs LINK-86 to ignore local symbols in the
	object files. The default option is LOCALS. For example, the
	command

A>link86 testl (nolocals], test2 [locals], test3

creates a SYM file containing local symbols from TEST2.OBJ and
TEST3.OBJ, but not from TEST1.OBJ.

7.7.2 LIBSYMS/NOLIBSYNS

	The LIBSYMS option directs LINK-86 to include in the SYM file
	any symbols that come from a library that is searched during the
	link operation. The NOLIBSYMS option directs LINK-86 not to include
	those symbols in the SYM file. Typically, such a library search
	involves the Run-time Subroutine Library of a high-level language
	such as PL/I-86. Because the symbols in such a library are usually
	of no interest to the programmer, the default is NOLIBSYMS.

7.8		MAP File Options

	The MAP option directs LINK-86 to create a MAP file "that
	contains information about the segments in the EXE file. The amount
	of information that LINK-86 puts into the MAP file is controlled by
	the optional parameters:

OBJMAP NOOBJMAP
L86MAP NOL86MAP
ALL

that are enclosed in brackets following the MAP option. The OBJMAP
parameter directs LINK-86 to put segment information about OBJ files
into the MAP file. The NOOBJMAP parameter suppresses this

7-13
Programmer's Utilities Guide	7.8		MAP File Options

information. Similarly, the L8614AP switch directs LINK-86 to put
segment information from L86 files into the MAP file. The NOL86MAP
parameter suppresses this irfformation. The ALL parameter directs
LINK-86 to put all the information into the KAP file.

	Once you instruct LINK-86 to create a MAP file, you can change
	the parameters to the MAP option at different points in the command
	line. For example,

A~LXXK86 FINMCE lmhP[ALLII,SCFMM,GPAPH.LB61S,NAPINOL86HAPII

	If you specify the MAP option with no parameters, LINK-86 uses
	OBJ14AP and NOL86MAP as defaults.

7.9 L86 File Options

	The SEARCH option directs LINK-86 to search the preceding file
	and include in the EXE file only those modules which satisfy
	external references from other modules. Note that LINK-86 does not
	search L86 files automatically. If you do not use the SEARCH option
	after a library file name, LINK-86 includes all the modules in the
	library file when creating the EXE file. For example, the command

A>Iink86 testl, test2, math.186 [search]

creates the file TEST1.EXE by combining the object files TEST1.OBJ,
TEST2.OBJ, and any modules from MATH.L86 that are referenced in
TEST1.OBJ or TEST2.OBJ.

	The modules in the library file do not have to be in any
	special order. LINK-86 makes multiple passes through the library
	index when attempting to resolve references from other modules.

7.10		Input File Options

	The INPUT option directs LINK-86 to obtain further command line
	input from the indicated file. Other files can appear in the
	command line before the input file, but the input file must be the
	last filename on the command line. LINK-86 stops scanning the
	command line, entered from the console, when it encounters this
	option. Note that you cannot nest command input files. That is, a
	ccmmand input file cannot contain the input option.

The input file consists of filenames and options just like a
command line entered from the console. For example, the file
TEST.INP		might include the lines
	MEMTEST=TEST1,TEST2,TEST3,
	IOLIB.L86[S1,MATH.L82[S1,
	TEST4,TEST51LOCALS)
		7-14
Programmer's Utilities Guide		7.10 Command Input File Options

To direct LINK-86 to use this file for input, enter the command

A>LINK86 TEST(INPUT]

	If no file type is specified for an input file, LINK-86 assumes
	INP.

7.11 1/0 Options

	The $ option controls the source and destination devices under
	LINK-86. The general form of the $ option is

$td

where t is a type and d is a drive specifier.

LINK-86 recognizes five types:

 C - Command File (EXE or OVR)
 L - Library File (L86)
 N - Nap File (MAP)
 0 - Object File (OBJ or L86)
 S - Symbol File (SYM)

	The drive specifier can be a letter in the range A thru P
	corresponding to one of sixteen logical drives, or one of the
	following special characters:

 X - Console
 Y - Printer
 Z - Byte bucket

	When you use the $ option, you cannot separate the td character
	pair with commas. However, you must use a comma to set off any $
	options from other options. For example, the three command lines
	shown below are equivalent:

A>link86 partl[$82,$od,$lbJ,part2

A>link86 partl[$szodlb],part2

A>link86 partl[$sz od lbl,part2

	The value of a $ option remains in effect until it is changed
	as LINK-86 processes the command line from left to right.

7-15
Programmer's Utilities Guide	7.11 1/0 Options

7.11.1 $Cd - C-and

	LINK-86 usually generates the EXE file on the same drive as the
	first object file in the command line. The $C option instructs
	LINK-86 to place the EXE file on the drive specified by the
	character following the $C, or to suppress the generation of a
	command file if you specify $Cz.

7.11.2 $Ld - Library

	LINK-86 usually searches on the default drive for Run-time
	Subroutine Libraries that are linked automatically. The $L option
	directs LINK-86 to search the specified drive for these library
	files.

7.11.3 $Hd - 14ap

	LINK-86 usually generates the Map file on the same drive as the
	EXE file. The $M option instructs LINK-86 to place the Map file on
	the drive specified by the character following the $M. Specify $MX
	to send the Map file to the console.

7.11.4 $Od - Object

	LINK-86 usually searches for the OBJ or L86 files that you
	specify in the command line on the default drive, unless such files.
	have explicit drive prefixes. The $0 option allows you to specify
	the drive location of multiple OBJ or L86 files without adding an
	explicit drive prefix to each filename. For example, the command

A>link86 pt$odl,q,r,s,t,u.186,b:v

tells LINK-86 that all the object files except the last one are
located on drive D. Note that this does not apply to files that are
searched automatically (see Section 7.11.2).

7.11.5 $Sd - Symbol

	LINK-86 usually generates a Symbol file on the same drive as
	the EXE file. The $S option directs LINK-86 to place the Symbol
	f ile on the drive specif ied by the character following the $S, or to
	suppress the generation of a symbol file if you specify $Sz.

7-16
Programmer's Utilities Guide		7.12 Command Line Errors

7.12 Command Line Errors

	If LINK-86 detects any kind of command line error, it prints
	the message

SYNTAX ERROR

echoes the command tail up to the point where the error occurs, and
follows it with a question mark.

For example,

A>link86 a, b, c; d
SYNTAX ERROR
A, B, C;?

A>link86 longfilename
SYNTAX ERROR
LONGFILEN?

End of Section 7

7-17
~ecfion 8
	LIB-86

	LIB-86 is a utility program for creating and maintaining
	library files that contain 8086 object modules. These modules can
	be produced by Digital Research's 8086 language translators such as
	RASM-86, PL/I-86, and CB86, or by any other translators that produce
	modules in Intel's 8086 object module format.

	You can use LIB-86 to create libraries, as well as append,
	replace, select, or delete modules from an existing library. You
	can also use LIB-86 to obtain information about the contents of
	library files.

8.1 LIB-86 Operation

	When you invoke LIB-86, it reads the indicated files and
	produces a Library file, a Cross-reference file, or a Module map
	f ile as indicated by the command line. When LIB-86 finishes
	processing, it displays the Use Factor, which is a decimal number
	indicating the percent of the available memory that LIB-86 used
	during processing. Figure 8-1 shows the operation of LIB-86.

OBJ 1 (OBJECT F' LE'

OBJ N (OBJECT FJ1LE		L86 (LIBRAR

L861 (LIBRARY
FILE)
	LIB-86
-All
	MAP (MODULE MAP FILE

L86 N (LIBRARY FILE)

	INP		L41.	XRF
	((INPUT COMMAND FILE~)			(CROSS-REFERENCE FILE)

Figure 8-1. LIB-86 operation

8-1
Programmer's Utilities Guide	8.1 LIB-86 Operation

Table 8-1 shows the filetypes that LIB-86 recognizes.

Table 8-1. LIB-86 Filetypes

Type		Usage
INP	Input Command File
L86	Library File
MAP	Module Map File
OBJ	Object File
XRF	Cross-reference File

8.2 LIB-86 Command Options

	When you invoke LIB-86, you can specify optional parameters in
	the command line that control the operation. Table 8-2 shows the
	LIB-86 command options. You can abbreviate each option keyword by
	truncating on the right, as long as you include enough characters to
	prevent ambiguity. Thus, EXTERNALS can be abbreviated EXTERN, EXT,
	EX, or simply E. The following sub-sections describe the function
	of each command option.

Table 8-2. LIB-86 Command Line Options
Option	T	Purpose	Abbreviation
	DELETE		Delete a Module from a Library file	D
	EXTERNAI;S		Show EXTERNALS in a Library file	E
	INPUT		Read commands from Input file	I
	MAP		Create a Module Map	MA
	MODULES		Show Modules in a Library file	MO
	NOALPHA		Show Modules in order of occurrence	N
	PUBLICS		Show PUBLICS in a Library file	P
	REPLACE		Replace a Module in a Library file	R
	SEGMENTS		Show Segments in a Module	SEG
	SELECT		Select a Module from a Library file	SEL
	XREF		Create a Cross-reference file	X
I						I

8-2
Programmer's Utilities Guide		8.3 Creating/Updating Libraries

8.3 Creating and Updating Libraries

	You can create or update libraries using a command line of the
	general form:

LIB86 <library file> - <file 1> t[optionsli
J<file 2>, .... <file n>j

	LIB-86 creates a Library file with the filename given by
	<library file>. if you omit the filetype, LIB-86 creates the
	Library file with filetype L86.

	LIB-86 reads the files,specified by <file 1> through <file n>
	and produces the library file. If <file 1> through <file n> do not
	have a specified f iletype, LIB-86 assumes a default f iletype of OBJ.
	The files to be included can contain one or more modules; that is,
	they can be OBJ or L86 files, or a combination of the two.

	modules in a library need not be in any particular order,
	because LINK-86 searches the library as many times as necessary to
	resolve references. Flowever, LINK-86 runs much faster if the order
	of modules in the library is optimized. To do this, remove as many
	backward references as possible (modules which reference public
	symbols that are declared in earlier modules in the library) so that
	LINK-86 can search the library in a single pass.

	Module names are assigned by language translators. The method
	for assigning module names varies from translator to translator, but
	is generally either the filename or the name of the main procedure.

8.3.1 Creating a new Library

	To create a new library, enter the name of the library, then an
	equal sign followed by the list of the files you want to include,
	separated by commas. For example,

A>lib86 newlib - a,b,c

A>lib86 newlib.186 - a.obj,b.obj,c.obj

A>Iib86 math = add,sub,mul,div

The first two examples are equivalent.

8.3.2 Adding to a Library

	To add a module or modules to an existing library, specify the
	library name on both sides of the equal sign in the command line.
	The library name appears on the left of the equal sign as the name
	of the library you are creating. The name also appears on the right
	of the equal sign, with the names of the other file or files to be
	appended. For example,

8-3
Programmer's Utilities Guide	8.3 Creating/Updating Libraries

A>libB6 math - math.186,sin,cos,tan

A>lib86 math - sqrt,math.186

8.3.3 Replacing a Module

	LIB-86 allows you to replace one or more modules without
	rebuilding the entire library from the individual object files. The
	command for replacing a module or modules in a library has the
	general form:

LIB86 <new library> - <old library>[REPLACE[<replace list>]]

where <new library> is the name of the file that LIB86 creates; <old
library> is the name of the file (that can be the same as <new
library>) containing the module you want to replace; and <replace
list> contains one or more module names of the form:

<module name> - <file name>

For example, the command

A>lib86 math - math.186 [replace lsqrt-newsqrt]]

directs LIB-86 to create a new file KATH.L86 using the existing
MATH.L86 as the source, replacing the module SQRT with the file
NEWSQRT.OBJ. If the name of the module being replaced is the same
as the file that replaces it, you need to enter the name only once.
For example, the command

A>lib86 math - math.186 ireplace[sqrt]]

replaces the module SQRT with the file SQRT.OBJ in the Library file
MATH.L86.

	You can effect multiple replaces in a single command by using
	commas to separate the names. For example,

A>lib86 new - math.186 [replace [sin-newsin,cos-newcos]]

	Note t - hat you cannot use the command options DELETE and SELECT
in conjunction with REPLACE.

	LIB-86 displays an error message if it cannot find any of the
	specified modules or files (see Appendix H).

8.3.4 Deleting a Module

	The command for deleting a module or modules from a library has
	the general form:

LIB86 <new library> - <old library> [DELETE [<module specifiers>)]

8-4
Programmer's Utilities Guide		8.3 Creating/Updating Libraries

where <module specifiers> can contain either the names of single
modules, or congeries of modules, which are specified using the name
of the first and the last modules of the group, separated by a
hyphen. For example,

A>Iib86 math - math.186 [delete Jsqrt11

A>Iib86 math - math.186 [delete [add, sub, sul, div]]

A>lib86 math - math.186 [delete [add - div)]

You cannot use the command options REPLACE and SELECT in conjunction
with DELETE.

	LIB-86 displays an error message if it cannot find any of the
	specified modules in the library.

8.3.5 Selecting a Module

	The command for selecting a module or modules from a library
	has the general form:

LIB86 <new library> <old library> (SELECT [<module specifiers>]]

where <module specifiers> can contain either the names of single
modules, or groups of modules, which are specified using the name of
the first and the last modules of the group, separated by a hyphen.
For example,

A>lib86 arith - math.186 [select (add, sub, mul, div11

A>Iib86 arith - nath.186 [select (add - diVJ1

You cannot use the command options DELETE and REPLACE in conjunction
with SELECT.

	LIB-86 displays an error message if it cannot find any of the
	specified modules in the library.

8.4 Displaying Library Information

	You can use LIB-86 to obtain information about the contents of
	a library. LIB-86 can produce two types of listing files: a Cross
	reference file and a Library Module Map. Normally, LIB-86 creates
	these listing files on the default drive, but you can rou ' te them
	directly to the console or the printer by using the command options
	described in Section 8.6.

8-5
Programmer's Utilities Guide 8.4 Displaying Library Information

8.4.1 Cross-reference File

	You can create a file containing the Cross-reference listing of
	a library with the command:

LIB86 <library name> [XREF]

	LIB-86 produces the file <library name>.XRF on the default
	drive, or you can redirect the listing to the console or the
	printer.

	The Cross-reference file contains an alphabetized list of all
	Public, External, and Segment name symbols encountered in the
	library. Following each symbol is a list of the modules in which
	the symbol occurs. LIB-86 marks the module or modules in which the
	symbol is defined with a pound sign, #, after the module name.
	Segment names are enclosed in slashes, as in /CODE/. At the end of
	the cross-reference listing, LIB-86 indicates the number of modules
	that were processed.

8.4.2 Library Module Map

You can create a Module Map of a library using the command:

LIB86 <library name> [MAP]

	LIB-86 produces the file <library name>.MAP on the default
	drive, or you can redirect the listing to the console or the
	printer.

	The Module Map contains an alphabetized list of the modules in
	the Library file. Following each module name is a list of the
	segments in the module and their lengths. The Module Map also
	includes a list of the Public symbols defined in the module, and a
	list of the External symbols referenced in the module. At the end
	of the Module Map listing, LIB-86 indicates the number of modules
	that were processed.

	LIB-86 usually alphabetizes the names of the modules in the
	Module Map listing. You can use the NOALPHA switch to produce a map
	listing the modules in the order in which they occur in the library.
	For example,

A>lib86 math.186 [map,noalpha]

8.4.3 Partial Library Maps

	You can use LIB-86 to create partial library maps in two ways.
	First, you can create a map with only module names, Segment names,
	Public names, or External names using one of the commands:

8-6
Programmer's Utilities Guide 8.4 Displaying Library Information

LIB86 <library name> (MODULES]
LIB86 <library name> [SEGMENTS]
LIB86 <library name> [PUBLICS]
LIB86 <library name> [EXTERNALS]

	You can also combine the SELECT command with any of the map
	producing commands described above, or the XREF command. For
	example,

A>lib86 math.186 [map,ncalpha,select [sin,coo,tan]]

A>lib86 math.186 [zref,select(sin,cos,tan11

8.5 LIB-86 Ccmmands on Disk

	For convenience, LIB-86 allows you to put long or commonly used
	LIB-86 command lines in a disk file. Then when you invoke LIB-86, a
	single command line directs LIB-86 to read the rest of its command
	line from a file. The file can contain any number of lines
	consisting of the names of files to be processed and the appropriate
	LIB-86 command options. The last character in the file must be a
	normal end-of-file character (1AH).

	To direct LIB-86 to read commands frcm a disk file, use a
	command of the general form:

LIB86 <file name> [INPUT]

If <f ile name> does not include a filetype, LIB-86 assumes filetype
INP.

As an example, the file MATH.INP might contain the following:

MATH = ADD [$OCI,SUB,MUL,DIV,
SIN,COS,TAN,
SQRT,LOG

Then the command

A>lib86 math [input]

directs LIB-86 to read the file MATH.INP as it3 command line. You
can include other command options with INPUT, but no other filenames
can appear in the command line after the INP file. For example,

A>Iib86 math [input,xref,sap]

8.6 Redirecting 1/0

	LIB-86 assumes that all the files it processes are on the
	default drive, so you must specify the drive name for any file that
	is not on the default drive. LIB-86 creates the L86 file on the
	default drive unless you specify a drive name. For example,

8-7

10-1
Programmer's Utilities Guide	8.6 Redirecting 1/0

A>lib86 e:math - math.l86,d:sin,d:cos,d:tan
	LIB-86 also creates the MAP and XRF files on the same-drive as
	the L86 file it creates, or the same drive as the first object file
	in the command line if no library is created.

	You can override the LIB-86 defaults by using the following
	command options:

$Md - 14AP file destination drive
$Od - OBJ or L86 source file location
$Xd - XRF file destination drive

where d is a drive name (A-P). For the KAP and XRF files, d can be
X or Y, indicating console or printer output, respectively. You can
also put multiple 1/0 options after the dollar sign. For example,

A>lib86 trig [map,zref,$oc*yzy] - sin,cos,tan
	The $0 switch remains in ef f ect as LIB-86 processes the command
	line from left to right, until it encounters a new $0 switch. This
	feature can be useful if you are creating a library f rom a number of
	files, the first group of which is on one drive, and the remainder
	on another drive. For example,

A>lib86 biglib - al [$oc],a2, ...a5O [$od],a5l, ...&108

End of Section 8

8-8
	Appendix A
Mnemonic Differences from the Intel Assembler

	RASM-86 uses the same instruction mnemonics as the Intel 8086
	assembler except for explicitly specifying far and short jumps,
	calls, and returns. The following table shows the four differences:

Table A-1. Mnemonic Differences
	Mnemonic Function			RASK-86 T	Intel
Intra-segment short jump:			JMPS	imp
Inter-segment jump:			JKPF	JMP
Inter-segment return:			RETF	RET
Inter-segment call:			CALLF	CALL

End of Appendix A

A-1
	Appendix B
Reserved Words

Table B-1. Reserved Words

	Predefined Numbers
BYTE		WORD DWORD
Operators
AND			LAST	MOD OR	SHR
EQ			LE	NE PTR	TYPE
GE			LENGTH	NOT SEG	XOR
GT			LT	OFFSET SHL
	Assembler Directives
CODEMACRO			ELSE	GROUP NOLIST 	RS
CSEG			END	IF ORG	RW
DB,			ENDIF	IFLIST PAGESIZE	SIMFORM
DD			ENDM	INCLUDE PAGEWIDTH	SSEG
DSEG			EQU	LIST PUBLIC	TITLE
DW			ESEG	NAME RB
EJECT			EXTRN	NOIFLIST RD
	Code-macro Directives
DB			DD	MODRM RELB	SEGFIX
DBIT			DW	NOSEGFIX RELW
	8086 Registers
AH			BL	CL DI	ES
AL			BP	CS DL	SI
AX			BX	CX DS	SP
BH			CH	DH DX	Ss
	Default Segment Names
CODE			DATA	EXTRA STACK

B-1

I-
Programmer's Utilities Guide	B		Reserved Words

Table B-1. (continued)

Segment Descriptors

BYTE	PARA

COMMON	PUBLIC 	WORD

	External Descriptors
ABS		DWORD 	NEAR

BYTE	FAR	WORD

For information on instruction mnemonics, see Appendix C.

End of Appendix B

B-2
	Appendix C
RASM-86 Instruction Set

Table C-1. RASK-86 Instruction Sumotary

Mnemoni7c			Description	FSection
	AAA		ASCII adjust for Addition	4.3
	AAD		ASCII adjust for Division	4.3
	AAM		ASCII adjust for Multiplication	4.3
	AAS		ASCII adjust for Subtraction	4.3
	ADC		Add with Carry	4.3
	ADD		Add	4.3
	AND		And	4.3
	CALL		Call (intra segment)	4.5
	CALLF		Call (inter segment)	4.5
	CBW		Convert Byte to Word	4.3
	CLC		Clear Carry	4.6
	CLD		Clear Direction	4.6
	CLI		Clear Interrupt	4.6
	CMC		Complement Carry	4.6
	CMP		Compare	4.3
	CMPS		Compare Byte or Word (of string)	4.4
	CMPSB		Compare Byte (of string)	4.4
	C14PSW		Compare Word (of string)	4.4
	CWD		Convert Word to Double Word	4.3
	DAA		Decimal Adjust for Addition	4.3
	DAS		Decimal Adjust for Subtraction	4.3
	DEC		Decrement	4.3
	DIV		Divide	4.3
	ESC		Escape	4.6
	HLT		Halt	4.6
	IDIV		Integer Divide	4.3
	IMUL		Integer Multiply	4.3
	IN		Input Byte or Word	4.2
	INC		Increment	4.3
	INT		Interrupt	4.5
	INTO		Interrupt on Overflow	4.5
	IRET		Interrupt Return	4.5
	JA		Jump on Above	4.5
	JAE		Jump on Above or Equal	4.5
	JB		Jump on Below	4.5
	JBE		Jump on Below or Equal	4.5
	ic		Jump on Carry	4.5
	JCXz		Jump on CX Zero	4.5
	JE		Jump on Equal	4.5
	JG		Jump on Greater	4.5
	JGE		Jump on Greater or Equal	4.5
	JL		Jump on Less	4.5
	JLE		Jump on Less or Equal	4.5

C-1
Programmer's Utilities Guide	C		Instruction Summary

	Table C-1. (continued)
Mnemonic		Description	Section
	imp	Jump (intra segment)	4.5
	JMPF	Jump (inter segment)	4.5
	JMPS	Jump (8 bit displacement)	4.5
	JNA	Jump on Not Above	4.5
	JNAE	Jump on Not Above or Equal	4.5
	JNB	Jump on Not Below	4.5
	JNBE	Jump on Not Below or Equal	4.5
	JNC	Jump on Not Carry	4.5
	JNE	Jump on Not Equal	4.5
	JNG	Jump on Not Greater	4.5
	JNGE	Jump on Not Greater or Equal	4.5
	JNL	Jump on Not Less	4.5
	JNLE	Jump on Not Less or Equal	4.5
	JNO	Jump on Not Overflow	4.5
	JNP	Jump on Not Parity	4.5
	JNS	Jump on Not Sign	4.5
	JNZ	Jump on Not Zero	4.5
	JO	Jump on Overflow	4.5
	ip	Jump on Parity	4.5
	JPE	Jump on Parity Even	4.5
	JPO	Jump on Parity Odd	4.5
	is	Jump on Sign	4.5
	iz	Jump on Zero	4.5
	LAHF	Load AH with Flags	4.2
	LDS	Load Pointer into DS	4.2
	LEA	Load Effective Address	4.2
	LES	Load Pointer into ES	4.2
	LOCK	Lock Bus	4.6
	LODS	Load Byte or Word (of string)	4.4
	LODSB	Load Byte (of string)	4.4
	LODSW	Load Word (of string)	4.4
	LOOP	Loop	4.5
	LOOPE	Loop while Equal	4.5
	LOOPNE	Loop While Not Equal	4.5
	LOOPNZ	Loop While Not Zero	4.5
	LOOPZ	Loop While Zero	4.5
	MOV	Move	4.2
	MOVS	Move Byte or Word (of string)	4.4
	MOVSB	Move Byte (of string)	4.4
	MOVSW	Move Word (of string)	4.4
	MUL	multiply	4.3
	NEG	Negate	4.3
	NOP	No Operation	4.6
	NOT	Not	4.3
	OR	Or	4.3
	OUT	Output Byte or Word	4.2

C-2
Programmer's utilities Guide			C	Instruction Summary

Table C-1. (continued)

mnemonic				Description	Section
	POP			Pop	4.2
	POPF			Pop Flags	4.2
	PUSH			Push	4.2
PUSHF		Push Flags	4.2
RCL		Rotate through Carry Left	4.3
RCR		Rotate through Carry Right	4.3
REP		Repeat	4.4
REPE		Repeat While Equal	4.4
REPNE		Repeat While Not Equal	4.4
REPNZ		Repeat While Not Zero	4.4
REPZ		Repeat While Zero	4.4
RET		Return (intra segment)	4.5
RETF		Return (inter segment)	4.5
ROL		Rotate Left	4.3
ROR		Rotate Right	4.3
SARF		Store AH into Flags	4.2
SAL		Shift Arithmetic Left	4.3
SAR		Shift Arithmetic Right	4.3
SBB		Subtract with Borrow	4.3
SCAS		Scan Byte or Word (of string)	4.4
SCASB		Scan Byte (of string)	4.4
SCASW		Scan Word (of string)	4.4
SHL		Shift Left	4.3
SHR		Shift Right	4.3
STC		Set Carry	4.6
STD		Set Direction	4.6
STI		Set Interrupt	4.6
STOS		Store Byte or Word (of string)	4.4
STOSB		Store Byte (of string)	4.4
STOSW		Store Word (of string)	4.4
SUB		Subtract	4.3
TEST		Test	4.3
WAIT		Wait	4.6
XCHG		Exchange	4.2
MAT		Translate	4.2
XOR		Exclusive Or	4.3

End of Appendix C

C-3
	Appendix D
Code-macro Definition Syntax

<codemacro> ::-		CODEMACRO <name> [<formal$list>]
[<list$of$macro$directives>l
ENDM

<name> ::- IDENTIFIER

<formal$list> ::- <Parameter$descr>[J,<parameter$descr>lI

<parameter$descr>		<form$name>:<specifier$letter>
<modifier$letter>[(<range>)]

<sPecifier$letter>					A	C	D	E I M I R I S I X

<modifier$letter>,					b	w	d 	sb

<range> ::= <single$range>j<double$range>

<single$range>		REGISTER I NUMBERB

<double$range>		NUMBERB,NUMBERB NUMBERB,REGISTER
	REGISTER,NUMBERB REGISTER,REGISTER

<list$of$macro$directives> ::-		<macro$directive>
	t<macro$directive>j
<macro$directive> ::= <db> I <dw>		<dd> I <segfix>
<nosegfix>			<modrm> 	<relb>
		<relw> I <dbit>
<db>			DB NUMBERB	DB <form$name>
<dw>			DW NUMBERW	DW <form$name>
<dd>			DD <form$name>

<segfix> ::= SEGFIX <form$name>

<nosegfix> ::= NOSEGFIX <form$name>

<modrm>			MODRM NUMBER7,<form$name>
		MODRM <form$name>,<form$name>
<relb>			RELB <form$name>
<relw>			RELW <form$name>
<dbit>			DBIT <field$descr>j,<field$descr>j

D-1
Programmer's Utilities Guide	D Code-macro Syntax

	<field$descr> ::= NUKBER15	NUKBERB
	NUMBER15	<form$name> ( NUMBERB

<form$name> ::= IDENTIFIER
	NUKBERB is 8-bits
	NUMBERW is 16-bits
	NUMBER7 are the values 0, 1,.	7
	NUMBER15 are the values.0, 1,.		15

End of Appendix D

D-2
	Appendix E
Sample Program

DRI RASM86 1.0			SOURCE: APPE.A86	Terminal Input/Output	PAGE	I

title 'Terminal Input/Output'
pagesize 50
p~gewidth 79
simform

Terminal 1/0 subroutines

The following subroutines
are included:

CONSTAT		- console status
CONIN		- console input
CONOUT		- console output

Each routine requires CONSOLE NUMBER
in the BL - register

Jump table:

CSFG		start of code segment

jmp_tab:
0000 E90600				0009	imp	constat
0003 E91COO				0022	312P	conin
0006 392FOO				0038	imp 	conout

1/0 part numb:r:***

Terminal 1:

Listing 9-1. Sample Program APPK.A86

E-1

I--,
Programmer's Utilities Guide	E		Sample Program

DRI RASM86 1.0		SOURCE: APPE.A86	Terminal Input/Output	PAGE 	2

0010	instatl7	equ		10h	input Status port
0011	indatal	equ		llh	input port
0011	outdatal	equ		llh	Output port
0001	readyimaskl		equ	01h	input ready mask
0002	readyoutmaskl		equ	02h	Output ready mask

Terminal 2:

0012	instat2	equ		12h	input status port
0013	indata2	equ		13h	input port
0013	outdat&2	equ		13h	Output Port
0004	r::dyima::2	:qu		04h	input ready mask
0008	r dyoutm k2	qu		08h	output ready mask

CONSTAT

Entry: BL - reg -		termindl no
EXit: AL - reg -		0 if not ready
	Offh if ready

constat:
0009 53ES4700	0054		push bx I Call okterminal
		constatl:
OOOD		52		push	dx
OOOE		B600		mov	dh,O	read status port

Listing E-1. (continued)

E-2
Programmer's Utilities Guide		E Sample Program

ORI RASKS6 1.0 SOURCE: APPE.AS6				Terminal Input/Output	PAGE 	3
	0010 SA970000						R	mov	dl,instatustab [BXI
	0014 CC						in	al,dx
	0015 22870600						R	and	al,readyinmasktab (bx]
	0019 7402						001D	jz	constatout
	001B Borr						mov	al,Offh
				constatout:
001D SA580ACOC3				pop dx	pop bx	or al,al i ret

CONIN

Entry: 3L - reg terminal no
Exit: AL - reg read character

0022						53ES2E00	0054	conin:	push	bx I call oktarminal
0026						ESZ4FF	0000	coninl:	call	constatl	test status
		OOOD
0029						74PS	0026	jz	coninl
002B						52	push	dx	read character
092C						3600	mov 	dh,O
002E					SA970200	R	mov	dl,indatatab [3Xj
0032					EC	in	al,dx
0033					247?	and	al,7fh	strip parity bit
0035					5ASBC3	pop dx I pop bx I ret

Entry:		BL - reg - terminal no

Listing E-1. (continued)

E-3

I--,
Programmer's Utilities Guide	E Sample Program

DRI RASM86 1.0		SOURCE: APPE.A86	Terminal Input/Output	PAGE 	4

AL - reg - character to print
0038		53E81800	0054	conout:	push	bx ! call okterminal
003C		52				push	dx
003D		50				push	ax
003E		B600			mov	dh,O	test status
0040		BA970000	R			mov	dl,instatustab [SX]
				conoutl:
0044		EC				in	al,dx
0045		22870800	R			and	al,readyoutmasktab [BXI
0049		74P9	0044		jz	conoutl
004B		58				pop	ax	write byte
004C		8A970400	R			mov	dl,outdatatab [BX]
0050		EE				out	dx,al
0051		5A5BC3			pop dx I pop bx I ret

..............
+ OKTERMINAL +
..............

Entry:		BL - reg	terminal no

			okterminal:
0054		OADB			or	bl , bl
0056		740A	0062		jz	e rror
0058		80FB03			cmp	bl,length instatustab + 1
005B		7305	0062		j::		:rror
005D		PECS			d		1
005F		B700			mov	bh,O
0061		C3			ret
0062		5B5BC3		error:	pop bx ! pop bx ! ret	do nothing

Listing 9-1. (continued)

E-4
Programmer's Utilities Guide			E	Sample Program

DRI RASM86 1.0			SOURCE: APPZ.AS6	Terminal Input/Output	PAGE 	5

end of code segment

	Data segment
..........

dseg

Data for each terminal

0000				1012	instatustab	db	instatl,instat2
0002				1113	indatatab	db	indatal,indata2
0004				1113	outdatatab	db	outdatal,outdata2
0006				0104	readyinsasktab	db	readyinmaskl,readyinmask2
0008				0208	readyoutmasktab	db	readyoutm ask 1, readyoutm ask 2

end of file		.......
end

END OF ASSEMBLY. NUMBER OF ERRORS:			0. USE FACTOR: 	31

Listin4'9-1.		(continued)

End of Appendix E

E-5

I--,
	Appendix F
RASM-86 Error Messages

RASM-86 displays two kinds of error messages:

nonrecoverable errors
diagnostics

	Nonrecoverable errors occur when RASM-86 is unable to continue
	assembling. Table F-1 lists the nonrecoverable errors RASM-86 can
	encounter during assembly.

Table P-1. RASK-86 Nonrecoverable Hrrors
__7
Error Message						Cause
NO FILE					RASM-86 cannot f ind the indicated
	source or INCLUDE f ile on the
	indicated drive.
DISK FULL					There	is not enough disk space
	for					the	output files. You
	should					either	erase some
	unnecessary files or get another
	disk with more			room and run
	RASM-86 again.
DIRECTORY FULL						There	is	not enough directory
	space					for the output files. You
	should					either	erase some
	unnecessary files or get another
	disk with more			directory space
	and run RASM-86		again.
DISK READ ERROR						RASM-86 cannot properly read a
	source					or INCLUDE	file. This is
	usually					the	result of an
	unexpected end-of-file. Correct
	the problem in			your source file.
CANNOT CLOSE						RASM-86 cannot	close an output
	f i 1 e .				You	should t a k e
	appropriate			action af ter
	checking to see		if the correct
	disk					is	in the drive and that
	the disk is not write-protected.
	F-1
Programmer's utilities Guide	F		RASM-86 Error Messages

Table F-1. (continued)
Error Message	I 	Cause

SYMBOL TABLE OVERFLOW	There is not enough memory for
the Symbol Table. Either reduce
the length or number of symbols,
or reassemble on a system with
more memory available.

SYNTAX ERROR	A parameter in the command tail
	of the RASM-86 command was
	specified incorrectly.

	Diagnostic messages report problems with the syntax and
	semantics of the program being assembled. When RASM-86 detects an
	error in the source file, it places a numbered ASCII error message
	in the listing file in front of the line containing the error. If
	there is more than one error in the line, only the first one is
	reported. Table F-2 shows the RASM-86 diagnostic error messages by
	number and gives a brief explanation of the error.

Table F-2. RASM-86 Diagnostic Error Messages

Message	Meaning

ERROR NO: 0	ILLEGAL FIRST ITEM

The first item on a source line is not a valid
identifier, directive, or mnemonic. For
example,

1234H

ERROR NO: 1 MISSING PSEUDO INSTRUCTION

The first item on a source line is a valid
identifier, and the second item is not a valid
directive that can be preceded by an
identifier. For example,

THIS IS A MISTAKE

F-2
Programmer's Utilities Guide			F	RASM-86 Error Messages

Table F-2. (continued)

Message		Meaning
ERROR NO: 	2 ILLEGAL PSEUDO INSTRUCTION
	Either a required identifier in front of a
	pseudo instruction is missing, or an identifier
	appears before a pseudo instruction that does
	not allow an identifier. ERROR NO: 3 DOUBLE
	DEFINED VARIABLE
	An identifier used as the name of a variable is
	used elsewhere in the program as the name of a
	variable or label. For example,
	X DB 5
	X DB 123H
ERROR NO: 	4 DOUBLE DEFINED LABEL
	An identifier used as a label is used elsewhere
	in the program as a label or variable name.
	For example,
	LAB3: MOV BX,5
	LAB3: CALL MOVE
ERROR NO: 	5 UNDEFINED INSTRUCTION
	The item following a label on a source line is
	not a valid instruction. For example,
	DONE: BAD INSTR
ERROR NO: 	6 GARBAGE AT END OF LINE - IGNORED
	Additional items were encountered on a line
	when RASM-86 was expecting an end of line. For
	example,
	NOLIST 4
	MOV AX,4 RET

F-3
Programmer's Utilities Guide	F RASM-86 Error Messages

Table F-2. (continued)

Message		Meaning
ERROR NO: 	7 OPERAND(S) MISMATCH INSTRUCTION
	Either an instruction has the wrong number of
	operands, or the types of the operands do not
	match. For example,
MOV CX,1,2
X DB 0
MOV AX,X
ERROR NO: 	8 ILLEGAL INSTRUCTION OPERANDS
	An instruction operand is improperly formed.
	For example,
	MOV [BP+SPI,1234
	CALL BX+1
ERROR NO: 	9 MISSING INSTRUCTION
	A prefix on a source line is not followed by an
	instruction. For example,
	REPNZ
ERROR 90: 	10 UNDEFINED ELEMENT OF EXPRESSION
	An identifier used as an operand is not defined
	or has been illegally forward referenced. For
	example,
imp X
A EQU B
B EQU 5
MOV AL,B
ERROR NO: 	11 ILLEGAL PSEUDO OPERAND
	The operand in a directive is invalid. For
	example,
	X EQU OAGH
TITLE UNQUOTED STRING

F-4
Programmer's Utilities Guide			F	RASM-86 Error Messages

Table F-2. (continued)

Message		Meaning
ERROR NO: 	12 NESTED IF ILLEGAL - IF IGNORED
	The maximum nesting level for IF statements has
	been exceeded.
ERROR NO: 	13 ILLEGAL IF OPERAND - IF IGNORED
	Either the expression in an IF statement is not
	numeric, or it contains a forward reference.
ERROR NO: 	14 NO MATCHING IF FOR ENDIF
	An ENDIF statement was encountered without a
	matching IF statement.
ERROR NO: 	15 SYMBOL ILLEGALLY FORWARD
REFERENCED - NEGLECTED
	The indicated symbol was illegally f orward
	referenced in an ORG, RS, EQU or IF statement.
ERROR NO: 	16 DOUBLE DEFINED SYMBOL
- TREATED AS UNDEFINED
	The identif ier used as the name of an EQU
	directive is used as a name elsewhere in the
	program.
ERROR NO: 	17 INSTRUCTION NOT IN CODE SEGMENT
	An instruction appears in a segment other than
	a CSEG.
ERROR NO: 	18 FILE NAME SYNTAX ERROR
	The f ilename in an INCLUDE directive is
	improperly formed. For example,
	INCLUDE FILE.A86X

F-5
Programmer's Utilities Guide	F		RASM-86 Error Messages

Table F-2. (continued)

Message	Meaning
ERROR NO: 	19 NESTED INCLUDE NOT ALLOWED
	An INCLUDE directive was encountered within a
	file already being included.
ERROR NO: 		ZO ILLEGAL EXPRESSION ELEMENT
An expression is improperly formed. For
example,
X DB 12X
DW (4
ERROR NO: 		21 MISSING TYPE INFORMATION
IN OPERAND(S)
	Neither instruction operand contains sufficient
	type information. For example,
	MOV [BX],10
ERROR NO: 	22 LABEL OUT OF RANGE
	The label referred to in a call, jump, or loop
	instruction is out of range. The label can be
	defined in a segment other than the segment
	containing the instruction. In the case of
	short instructions (JMPS, conditional jumps,
	and loops), the label is more than 128 bytes
	from the location of the following instruction.

F-6
Programmer's Utilities Guide		F RASM-86 Error Mes"gep

Table F-2. (continued)

Message		Meaning
ERROR NO: 	23 MISSING SEGMENT INFORMATION
IN OPERAND
The operand in a CALLP or JMPF instruction (or
an expression in a DD directive) does not
contain segment information. The required'
segment information can be supplied -by
including a numeric field in the segment
directive as shown:
CSEG 1000H
X:
J~PF, X
DD X
ERROR NO: 	24 ERROR IN CODEMACRO BUILDING
	Either a code-macro contains invalid
	statements, or a code-macro directive was
	encountered outside a code-macro.
ERROR NO: 		25 NO HATCHING IF FOR ELSE
An ELSE statement was encountered without a
matching IF statement.

End of Appendix F

F-7
	Appendix G
LINK-86 Error Messages

	During the course of operation, LINK-86 can display error
	messages. The error messages and a brief explanation of their cause
	are described in Table G-1.

Table G-1. LINK-86 Error Messages

Message		Meaning

CANNOT CLOSE

LINK-86 cannot close an output file. You
should take appropriate action after
checking to see if the correct disk is in
the drive and that the disk is not write
protected.

COMMAND TOO LONG

There are too many characters in an INP
file.

DIRECTORY FULL

There is not enough directory space for
the output files. You should either erase
some unnecessary files or get another disk
with more directory space and run LINK-86
again.

DISK READ ERROR

LINK-86 cannot properly read a source or
object file. This is usually the result
of an unexpected end-of-file. Correct the
problem in your source file.

DISK WRITE ERROR

A f ile cannot be written properly,
probably due to a full disk.

G-1
Programmer's Utilities Guide	G LINK-86 Error Messages

Table G-1. (continued)

Message	Meaning

GROUP OVER 64K

An attempt is made to put more than 64K
bytes - into a single group, either code
group or data group.

MORE THAN ONE MAIN PROGRAM

There is a nonfatal error indicating the
presence of more than one main program
among the files being linked. The
definition of a main program depends on
the language. For example, in PL/I it is
indicated by "options (main)", in CB-86
any program containing code outside of
function definition is amain program, and
in assembly language it is indicated by a
label in the END statement, as in "END
START".

MULTIPLE DEFINITION

The indicated symbol is defined as PUBLIC
in more than one module. Correct the
problem in the source file, and try again.

NO FILE

LINK-86 cannot find the indicated source
or object file on the indicated drive.

NO STACK SEGMENT

There is no stack segment defined for the
EXE file created by LINK-86.

OBJECT FILE ERROR

LINK-86 detected an error in the object
file. This is caused by a translator
error or by a bad disk file. Try
regenerating the file.

G-2
Programmer's Utilities Guide		G LINK-86 Error Messages

Table G-1. (continued)

Message 		meaning
SEGMENT 	ATTRIBUTE ERROR
The <Align type> or <Combine type> ot ~th~6
indicated segment is not the same as the
type of the segment in a previously linked
file. Regenerate the object file after
changing the segment attributes as needed.
SEGMENT 	COMBINATION ERROR
An attempt is made to combine segments
that cannot be combined. Change the
segment attributes and relink.
SEGMENT 	OVER 64K
There is an attempt to put more than 64K
bytes in a single segment.
SYMBOL 	TABLE OVERFLOW
LINK-86 ran out of Symbol Table s . pace.
Either reduce the number or length of
symbols in the program, or relink on a
system with more memory available.
SYNTAX ERROR
LINK-86 detected a syntax error in the
command line, probably due to an improper
filename or an invalid command option.
LINK-86 echoes the command line
point where it found the error. ..Retype,
the command line or edit the INP file."'
TARGET 	OUT OF RANGE
The target of a fixup cannot be reachel.
from the location of the fixup.-,~

G-3
Programmer's Utilities Guide	G LINK-86 Error Messages

Table G-1. (continued)

Message 	Meaning

UNDEFINED SYMBOLS

The symbols following this message are
referenced but not defined in any of the
modules being linked.

End of Appendix G

G-4
Appendix H
LIB-86 Error Messages

	LIB-86 can produce the following error messages during
	processing. with each message, LIB-86 displays additional
	information appropriate to the error, such as the filename or module
	name, to help isolate the location of the problem.

Table B-1. LIB-86 Error Messages

	Message					Meaning
CANNOT CLOSE				LIB-86 cannot close an output
		f i 1 e .			You should	take
		appropriate action		after
		checking to see if the correct
		disk				is in the drive and that
		the				disk is not	write
		protected.
DIRECTORY FULL				There is not enough directory
		space				for	the output files.
		You				should either erase	some
		unnecessary files or		get
		another				disk with	more
		directory space and run LIB-86
		again.
DISK FULL				There is not enough disk space
		for				the	output files.	You
		should				either erase	some
		unnecessary files or		get
		another disk with more room and
		run LIB-86 again.
DISK READ ERROR				LIB-86 cannot properly read a
		source or object file.		This is
		usually				the result of	an
		unexpected end-of-file.
		Correct				the problem	in your
		source 				file.

INVALID COMMAND OPTION		L I B - 8 6 encountered an
unrecognized option in the
command line. Retype the
command line or edit the INP
file.

H-1
Programmer's Utilities Guide	H LIB-86 Error Messages

Table H-1. (continued)
Message	I	I	Meaning

	MODULE NOT FOUND	The indicated module name, which
		appeared in a REPLACE, SELECT,
		or	DELETE switch, cannot be
		found.			Retype the command line
		or edit the INP file.
	MULTIPLE DEFINITION	The	indicated		symbol is defined
		as	PUBLIC	in more than one
		module. Correct the problem in
		the		source file, and try again.
-,,,.,.NO FILE	LIB-86 cannot find the indicated
		file.
	OBJECT FILE ERROR	LIB-86 detected an error in the
		object file.	This is caused by
		a	translator		error or a bad
		disk		file. Try regenerating
		the file.
	RENAME ERROR.	LIB-86			cannot rename a file.
		Check		that the disk is not
		write-protected.
	,Yi4BOL,TABLE .: OVERFLOW	There		is not enough memory for
		the	Symbol Table. Reduce the
		number of	options in the
		command line (MAP and XREF each
		use		Symbol Table space), or use
		a	system with more memory.
	SYNTAX ERROR	LIB-86 detected a syntax error
		in		the command line, probably
		due		to an improper filename or
		an	invalid	command option.
		LIB-86 echoes the command line
		up		to the point where it found
		the	error.	Retype the command
		line or edit the INP file.

End of Appendix H

H-2
	Appendix I
XREF-86 Error Messages

	During the course of operation, XREF-86 can display error
	messages. Table I-1 shows the error messages and a brief
	explanation of their cause.

Table 1-1.		-86 Zrror ftissages

Error Message		Meaning
7
CANNOT CLOSE		XREP-86 cannot close an output
	f ile. You zhould_,ta~,e
	appropriate 'action 'aft6k
	checking to see if the
	correct disk is in the drive
	and that the disk is not
	write-protected.
DIRECTORY FULL		There is not enough~-hlri'c'iio-ir'y'
	space for the output files,
	You should either erase some
	unnecessary files- or_,,ig.Wt
	another disk "w"1'th-"fnbke
	directory space and run XREF
	86 again.
DISK FULL		There is not enough disk space
	for the output files. You
	should either erase~.,z,4~mg
	unnecessary Eiles o . r , g elt
	another disk with more room
	and run XREF-86 again.
NO FILE		XREF-86 cannot f ind the
	i nd ica ted f ile on the
	indicated drive.
SYMBOL FILE ERROR		XREF-86 issues thLT-ffe-s-s-a'-F--'
	when it reads an invalid SYM
	file. Specifically, a line
	in the SYM f ile that is not
	terminated with a carriage
	return line-feed causes this
	error message.
Programmer's Utilities Guide	I	XREF-86 Error Messages

Table 1-1. (continued)

	Error Message		Meaning
	SYMBOL TABLE OVERFLOW	XREF-86	ran out of Symbol
		Table space.	Either reduce
		the number or	length of
		symbols in the program, or
		rerun on a system with more
		memory.

End of Appendix I

1-2
Index

switch, 7-15		arithmetic loij4~.41, -Arid 	hift,
$Cd - Command, 7-16				instruations,_4-4."'
$Ld - Library, 7-16				ASCII charact*r_iet,-if!
$Md - map, 7-16				assembler directives, 3-3
$Od - Object, 7-16				conditional assembly, 3-3
$Sd - Symbol, 7-16				data definition and memory,
8086 instruction mnemonic				allocation, 3-3
	keywords, 2-5				linkage
8086 object module, 8-1				miscellaneous, 3-3
<align type>, 3-5				output listing control, 3-3
<combine type>, 3-6				segment control, 3-3
	COMMON, 3-6				symbol definition, 3-3
	LOCAL, 3-6				assembly language source
	PUBLIC, 3-6				file, 1-1
	STACK, 3-6				assembly language macros, 5-1
<filename>.LST, 6-1				attributes of labels, 2-7
<filename>.XRF, 6-1				attributes of variables, 2-6
<segment name>, 3-5
A
		Backus-Naur form, 5-2
AAA, 4-5				base address, 3-4
AAD, 4-5				base or radix of a constant,
AAM, 4-5				2-3~
AAS, 4-5				base- and index-addressing
absolute number, 2-8				modes, 2-15
absolute paragraph address,			binary constants, 2-3
		7-11			bit patterns, 4-1
ADC, 4-5			bracketed expression, 2-15
ADD, 4-6			BYTE, 2-6
Adding to a Library, 8-3			alignment, 3-6
addition and subtraction			align type, 7-6
		operators, 2-12			byte <align type>, 3-5
ADDITIONAL
	MAXIMUM, 7-11			C
address conventions in
		RASM-86, 3-4			CALL, 4-13
address expression, 2-14			CB-86, 8-1
	components, 2-14		CB86, 7-1, 7-9
align and combine attributes,		CBW, 4-6
	7-4			character string, 2-3
align				constant, 2-3
	attributes, 7-4		class name, 7-4
	align type, 7-5		class name*, 7-3
	align type*, 7-3		CLC, 4-16
allocate storage, 3-11, 3-12		CLD, 4-16
AND, 4-7		CLI, 4-16
arithmetic, 2-7		CMC, 4-16
arithmetic operators, 2-12		CMP, 4-6

Index-1
CMPS, 4-10,	DATA section, 7-8
CODE section, 7-8	data
code segment, 2-6	segment, 2-6
code-macro	transfer, 4-3
directive, 5-1,5-4 to 5-7	instructions,4-3
	operand modifiers, 5-4	DB, 3-10
	operand specifiers, 5-3		directive, 2-4, 3-10
code-macros, 5-1		DW, and DD, 5-7
colloqting,,segments, 7-4,	DBIT, 5-7
combind	DD, 3-11
	attributes, 7-4		directive, 3-11
	type*, 7-3	DEC, 4-6
ccmmand (CMD) file, 7-1, 7-3	decimal constant, 2-3
command file (CMD or OVR),	default, 8-6, 8-7
		7-15		align types, 3-6
.ccmmand		drive, 6-1, B-5
	file section, 7-8		list device, 6-2
	line error, 7-17		segment names, 3-5
	tail, 14-2		values
comment field, 2-2, 2-15		command options, 7-12
ccmments, 215		command parameters, 7-12
common	define data area, 3-10
	block'-7-5	defining a code-macro, 5-2
	ccmbi~e.type,,7-5		deleting a module, 8-4
	<combine	3-6	delimiters, 2-1
COMMON <comla4ne type>, 3-7	device name, 1-3, 1-4
condition.a,l: ~q',ssembly '3-.m3, 3-9		diagnostics, 14-1
console output;., 4_	directive statement, 2-16, 3-3
constants, 2-3		syntax, 2-16
control transfer.instructions, directory, 14-1
		4.-;.r2	displaying library
creating and updating			information, 8-5
		libraries, 8-3,	DIV, 4-6
crea . tiOn of'oUtput files, 2	dollar-sign operator, 2-13
cross-reference file, 6-1,	DS register, 3-4
		8-1~to 9-6	DSEG (Data Segment), 3-5
CS register, 3-4	Dw, 3-11
CSEG (Code -Segment.), 3-5	DW directive, 3-11
current	DWORD, 2-6
	code segment, 3-4
	data segment, 3-4	E
	extra segment, 3-4
	stack segment, 3-4	EJECT, 3-12
CWD, 4-6		directive, 3-12
			ELSE directive, 3-9
D					END directive, 3-7
			end-of-file character (1AH),
DAA, 4-6			3-7
DAS, 4-6	end-of-line, 2-15
data definition and memory	ENDIF directive, 3-9
		allocation, 3-3

Index-2
EQU directive, 3-9			G
error messages, 14-1
ES register, 3-4			GROUP directive,, 3-7,
ESC, 4-16			group*, 7-4
ESEG (Extra Segment), 3-5			group
even boundary, 3-6			CGROUP, 7-8
EXE file, 7-9			DGROUP1, 7-8
	header, 7-11
	options, 7-11
	sections, 7-11
EXE file option parameters			hexadecimal
	ABSOLUTE, 7-11			HLT, 4-17
	ADDITIONAL, 7-11
	CLASS, 7-11
	GROUP, 7-11
	1/0 buf e			li
MAXIMUM, 7-11				f rs,	1
ORIGIN, 7-11				identifiers,	2-2, 2-4
SEGMENT, 7-11				IDIV, 4-6
EXE file		IF directive, 3-9
	CODE section, 7-10		IMUL, 4-6
	DATA section, 7-10		IN, 4-3
	EXTRA section, 7-10		INC, 4-6
	STACK section, 7-10		INCLUDE
X1 section, 7-10		directive, 3-14, 14-6
X2 section, 7-10		file, 14-1
X3 section, 7-10		index registers,.
X4 section, 7-10		indexed library, 1-1
	initialized -storli
expressions, 2-13, 2-14
	't
External, 8-6		Input Command- ile
	name symbols, 8-6		Input File Optlo4s 7--l 4 3 al.,
extra segment, 2-6		INPUT option_,, 7-44,*1
		at,
EXTRN Directive, 3-8			instruction~st*	-6 t, Z~l
	syntax, 2-15
F			INT, 4-13
	Intel 8086 -.rfifol.cait , alai
file name extensions, 1-2			format, 1
filetype A86			Intel's 8086 object,'m	e
	RASM-86 INPUT file, 1-1				format, 7-1,1 8-;	_13
filetype LST			INTO, 4-13
	RASM-86 LISTING file, 1-1				invoking LINK~4-61 1~- 23
filetype OBJ			invoking RASM-86, 1-2
	RASM-86 OUTPUT file, 1-1				invoking XREr-,.86,,'
filetype SYm			IRET, 4-13
	RASM-86 SYMBOL file, 1-1
FILL/NOFILL, 7-12
flag
	bits, 4-2, 4-5			JA, 4-14
	registers, 4-2			JB, 4-14
	register symbols, 4-2				JCXZ, 4-14
formal parameters, 5-1, 5-3			JE, 4-14
forward reference, 14-5			JG, 4-14
		JL, 4-14
		JLE, 4-14
		JMP, 4-14
		JNA, 4-14
	Index-3
JNB, 4-14-	LIB-86 command options
,TNE, 4-15
		INPUT, 8-7
JNG';		4-15.-.	MAP, 8-6
JNL,		4-15	NOALPHA, 8-6
JNO,		4-15	XREF, 8-6
	aNP: 4-145		,	creating a Cross-reference
JNS, 4-15	file, 8-6
JNZ , -.4-15,
	creating a Library Module
JO, 4-15		Map, 8-6
jp'~ -4-15	creating partial library
JS,. -4-~15 -		maps, 8-6
JZ, 4-15	deleting a module, 8-4
	displaying library
		information, 8-5
	error message, 8-4
keywords, 2-4, 2-5	filetypes, 8-2
	invoking, 8-1
L	librarian utility, 8-1
	reading commands from a
L86 file, 8-7		disk file, 8-7
L86 File Options, 7-14	redirecting 1/0, 8-7
label	replacing a module, 8-4
out of range, 14-6	selecting a module, 8-5
labels, 2-6,-2-7	Use Factor, 8-1
LAEF, 4-3
		libraries, 7-16
language translators, 7-1	library file, 8-1 to 8-3
LDS, 4-3		(1,86), 7-15
LEA, 4-3	Library Module Map, 8-5
LES, 4-3	LIBSYMS/NOLIBSYMS, 7-13
LXB~-86,~3~8.-# 7-lj 8~1~	Link process, 7-4
LIB-86 Command Line~Options		LINK-86, 4, 3-8, 7-1
	DELETEF 8~2 -	LINK-86 command line, 7-2, 7-m-14
	EXTERNALS,-8-2	LINK-86 command options, 7-9
	INPUT, 8-2~		CODE, 7-10
	MAP, 8-2		DATA, 7-10
	,MOVULZSi,8-2		EXTRAF 7-10
	NOALPHA, 8-2		FILL, 7-10
	PUBLICS, 8-2		INPUT, 7-10
	REPLACE, 8-2		LIBMAP, 7-10
	SEGMENTS, 8-2		LIBSYMS, 7-10
	SELECT, 8-2		LOCALS, 7-10
	XREF, 842		MAP, 7-10
LIB-8,6		NOFILL, 7-10
	adding to ai-libraiy, 8-3		NOLIBSYMS, 7-10
	command optioris"-,8-2		NOLOCALS, 7-10
	commands'oh disk, 8-7		NOMAP, 7-10
	error messagre,,6~5		SEARCH, 7-10
	LIB-86 filetypes		STACK, 7-10
	INPF 8-2		Xl, 7-10
L86F		8-2		X2, 7-10
MAP,		8-2		X3, 7-10
OBJ,		8-2		X4, 7-1 0
XRF,		8-2
command line, 8-1
		Index-4
Linkage Control, 3-3			nesting
linkage editor, 3-5, 3-6, 3-7,			IF directives, 3-9
	7-1			level, 14-5
listing file, 1, 14-2				parentheses in expresaiovtx;~
loading the EXE file, 7-11				2-14
local <combine type>, 3-6				NOirLIST, 3-12
local symbols, 4, 7-10, 7-13			and MIST directiVas-r 3-~:=
LOCAL			NOLIST, 3-13
	<combine type>, 3-6			and LIST Directives,. -3-11 !!T,
LOCALS/NOLOCALS, 7-13			NOMAP option, 7-13
location			nonprinting characters',,
	counter, 2-13, 2-15, 3-7				nonrecoverable errors,1.1-4-1
	pointer, 2-2				NOSEGFIX, 5-5
LOCK, 4-17				NOT, 4-7
LODS, 4-10				number symbols, 2-7
logical, 2-7				numbers, 2-6
	address, 3-4				numeric	-
	operators, 2-11				constants, 2-3
LOOP, 4-15				expression, 2-15
LST file, 6-1
		0
m
		object file, 1, 7-16, 8-2_-
map				(MAP) File, 7-1, 7-9 to	(OBJ or L86),,7e-15
	7-15, 8-7			octal constant'-2-31-~
	options, 7-13		odd boundary, ~-6
maximum length of a character			offset, 2-6	--' ~ t,,1.__
	string, 2-4		attribute, 	2-6, 2-7
megabyte, 7-3			of a variable, 2-6 E-o
memory execution, 3-4			value, 3-4
miscellaneous, 3-3				offsets within-a-segmintil,748:
mnemonic, 2-16				intersegment~
mnemonics, 4-1				intrasegment, 3~4,1
modifiers, 5-3, 5-5				operands,
MODRM, 5-5				operator precedenc4j12~13qZ7
module map, 8-6				operators, 2-1, 2-5, 2-4 7AM
	file, 8-1, 8-2, 8-5				optional run-time-par&tetdid,
modules				1-3
	alphabetized list, 8-6				OR, 4-7
MOV, 4-3				order of operations,
MOVS, 4-10				ORG directive, 3-7 , i'-, I ~, H:, ~ Z a 2
MUL, 4-7				OUT, 4-4
multiple replaces in a single				output files, 2, 14~1-~
		command, 8-4				output listing control, 3-3-1--
multiplication and division			overlays,	_N~ ti
	operators, 2-12		overriding ZINK-EM	Trmoz
		positioningj~ 71.-9
N			overriding operatcw-_~r%
		precedence,
NAME directive, 3-8
name field, 2-16			P
NEG, 4-7
	PAGE align type, 7-6
PAGESIZE Directive, 3~-1-8 -iqX
PAGEWIDTH Di3v~U;V.P_,- 3jo-131-,W-3

Index-5
PARA (paragraph) - ,3-6	Redirecting 1/0, 8-7
PARA <align-type>,,3-5, 3-6.		Register Keywords, 2-5
PARAdRAPH-align type, 7-16	registers, 2-5
parameter list, , 1-3-	relational, 2-7
Partial'Libraiy kipir 870	relational operators, 2-11
period operator, 2~13-	RELB and RELW, 5-6
PHASE 1 -C6114iction, 7-4	relocatable
physical address; 3 , 4*-		number, 2-8
PL/I-86, 7-1,,7-9, 8_1		object files, 7-1
POP, 4-4	REP, 4-12
'pred#flned numbers.' 2-5	Replacing a Module, 8-4
prefix, 4-11	reserved words, 5-2
printer output, 4	ROL, 4-8
processor control	ROR, 4-8
		instructions, 4-16	RS, 3-11
pseudo instruction, 14-2	RS directive, 3-11
PTR operator, 2-13	run-time
Public, 8-6		options, 1-3
	combine type, 7-4		parameter, 14-2
	<combine type>, 3-6.		parameters, 1-3
	name symbols, 8-6	RW, 3-12
	symbols, 1-4		directive, 3-12
	symbols defined in the
		module, 8-6	S
PUBLIC
	directiver 3-8	SAHF, 4-4
	<comf>ine' tYpe>-, 3-6	SAL, 4-8
PUSH, 4-4	SAR, 4-8
			SBB, 4-7
R					SCAS, 4-10
			SEARCH option, 7-14
radix indicators, 2-3	Section, 7-3
range specifiers, 5-4	SEGFIX, 5-5
RASM-86, 6-1,'7-1,'8~1	segment, 2-6, 7-3
	Character Set, 2-1		attribute, 2-6, 2-7
	COMMAND LINE, 1-2		base address, 3-4
	directives, 2-5		base values, 3-4
	error messages, 1-1, 1-3		boundaries, 7-5
	identifier, 7-3		control, 3-3
	instruction set, 4-1		directive, 3-4
	operators, 2-7		map, 710
	segment directives, 7-9		name, 7-4
	invalid parameter,, 1-3		name symbols, 8-6
	local symbols in OBJ file,			name*, 7-3
		1-4		names, 8-6
	redirecting output, 1-3		offset, 7-13
	use factor, 1-3		override, 2-2, 2-7
RB directive, 3-12		override operator, 2-12
RCL, 4-8		override prefix, 3-4
RCR, 4-8		register, 3-7, 7-8
RD, 3-12		registers, 3-4
	directive, 3-12		starting address, 2-6
Reading LINK-86 command lines			override prefix, 5-5
		from a disk file, 7-2,
		7-14

Index-6
selecting a module, 8-5				0
separators, 2-1
SHL, 4-8			unary opqrat6ca, "2Zj2
SHR, 4-9			uninitialil ed_aata
SID-86, 7-1				file, -.~10
sign-on message, 1-2				unresolved giymboli,~,1-1
SIMFORM Directive, 3-13				unsigned nwn~6er'i
			0
source file, 1-1, 14-2				updating 4brijjei vitih.
special characters, 2-1				LIB-66F '8-3
				- 1 6
specifiers, 5-3				use fact	Z-~3, _7-~A.,
			qr. ,		.
SS register points, 3-4					RASM-86, 1--3
SSEG (Stack Segment), 3-5					user-def i-ned
stack combine type, 7-5
stack segment, 2-6					V
stack
	<combine type>, 3-6			Valid code ' macri:~ ~ti"rec4i~*'S'
statements, 2-15			DB, S.-.2
STC, 4-17			DBIT, t-2
STD, 4-17			DD, 5-2
STI, 4-17			DW, 5-2
STOS, 4-11			MODRM, 5-2
string			NOSEGFIX, .5~-2,
	~onstant, 2-3			RELB, 5-2
	instructions, 4-10			RELw, 5-2
	operations, 4-10			SEGFIX ' 5-2
SUB, 4-7			variables, 2-6
SYM file, 6-1, 7-1, 7-9, 7-10		manipulator,Z-124,.
SYM File Options, 7-12		manipulators, !k~"c;e;Lt.G_Kq. 2-7
symbol, 2-6, 3-9
	definition, 3-3		w
	file, 1-1, 7-17
file (SYM),					7-15	WAIT, 4-17
table, 5-1,					14-2	WORD, 2-6
table (SYM)					file, 7-1	<align ty e
table file,					6-2	align type( 7~-6	3 2.Vt
<filename>.SYM, 6-1					ent,_,3-
	alignm
table space, 7-11
	x
T
	XCHG, 4-4
TEST, 4-9			XLAT, 4-4
testing flag registers, 4-2			XOR, 4-9
TITLE Directive, 3-13			XREF-86, 6-~'l
token, 2-1			command iinje,,,4.-~
type, 2-6			cross-re.*erence
type attribute, 2-5, 2-6			input files; e-:l-'
		output filTM4. 6-1
	XRF file, 6- -8-7

Index-7
