Contents of the ALINT.DOC file
alint 1.00 04/26/86
Alint is a miniature "lint" for assembler programmers. It can
help you find data-type conflicts between modules of
multi-module assembler programs.
For example, if you declare in Module A:
a_var dw ?
and in Module B:
you will find that neither the assembler nor the linker will
tell you that you have made a mistake. If you were to code in
the assembler will clear only the low byte of the data word
'a_var'. This kind of error can lead to obscure runtime
problems and is very difficult to debug. Alint can detect this
type of error.
Alint can optionally produce a cross-reference of all global
variables in a multi-module assembler program.
To use alint in its default mode, simply type 'alint' at the
Alint will prompt for the names of the source files one by one;
enter the names of the assembler source files you want checked,
including drive and path if necessary. If you do not include an
extension, alint will first look for the file as given; if it is
not found, it will then append the extension '.asm' and try
When you have entered all of the names, respond to the 'Source
file?' prompt by just hitting .
Alint will then read the source files one by one, and display a
list of errors when it is done.
If you have many files to process, you may wish to instead
prepare a text file containing a list of the names of files to
be processed. You can tell alint to read this "response file"
by placing its name on the command line:
Use only one filename per line in your response file. Any line
beginning with a semicolon will be ignored, thus allowing
Alint will display certain information about each data item for
which any error was detected. This information includes:
1. The name of the item.
2. The name of the source file in which it is defined, along
with the data type (byte, word, dword, qword, tbyte) and
the line number in which it is defined.
3. The names of the source files in which the item is
referenced via EXTRN, along with the EXTRN line number
and data type.
Def dword 116 file1.asm
Ref word 5 file2.asm
Ref byte 14 file3.asm *** TYPE MISMATCH ***
The line marked DEF (for DEFinition) indicates that the variable
MYVAR is defined (and PUBLIC) in the source file FILE1.ASM. It
is defined as a WORD quantity (either via DW or LABEL WORD) in
line 116 of FILE1.ASM.
The first REF (for REFerence) line indicates that MYVAR is
referenced via an EXTRN statament in line 5 of the source file
FILE2.ASM, and that it is declared to be a WORD variable.
The second REF line indicates that MYVAR is also referenced in
an EXTRN statament in line 14 of FILE3.ASM. Here it is declared
to be a BYTE, and this is a type mismatch.
If the same variable is declared PUBLIC in more than one module,
subsequent DEF lines will be marked '*** MULT DEF ***'.
If a variable is declared PUBLIC in one or more modules, but no
EXTRN references were found, alint will display the message
'*** NO REF ***'.
If an EXTRN reference was found for a variable for which there
is no PUBLIC declaration, alint will display the message '*** NO
DEF ***'. Certain definition constructs will elude alint (such
as 'buffer equ $'), so this message may sometimes be issued
erroneously. See the 'Limits' section below.
Obtaining a cross-reference
Normally, alint will display information about a data item only
if it found one of the errors described above. You can obtain a
complete PUBLIC/EXTRN cross-reference by adding a '-x' switch
when you invoke alint:
alint -x filelist.txt
With the -x switch, alint will display all information described
You can redirect alint's principal output using DOS's standard
redirection facility. The program logo and the list of files
being processed will not appear in the output file.
For example, this will write a complete cross-reference to the
text file 'xref.txt':
alint -x filelist.txt > xref.txt
Alint is accompanied by three demonstration files:
These files provide a small demo of how alint works. DEMO1.ASM
and DEMO2.ASM are two small assembler files (dummies) that
contain a few errors. DEMO.LST is a small text file containing
the names of the two programs; you can use this as an alint
response file. To see the program run, just type:
alint -x demo.lst
All PUBLIC statements are assumed to precede the items to which
they refer. Although this is not a MASM requirement, it
considerably simplifies alint processing, making it faster and
smaller (and eliminating the need for two passes through the
Alint is interested ONLY in:
1. PUBLIC items that are SUBSEQUENTLY defined via one of:
a. DB (Define Byte)
b. DW (Define Word)
c. DD (Define Doubleword)
d. DQ (Define Quadword)
e. DT (Define Ten-byte)
f. LABEL BYTE
g. LABEL WORD
h. LABEL DWORD
i. LABEL QWORD
j. LABEL TBYTE
2. EXTRN items with an attribute of:
Note in particular that alint does NOT attempt to reconcile code
labels (NEAR/FAR). The linker should do this for you. Also,
alint does not understand data defined via constructs such as
'buffer equ $'. This may lead to a few incorrect error
There is a limit of 200 PUBLICs and 200 EXTRNs per source file.
There is a limit of 100 source files.
Source files are assumed to be syntactically correct. Comments
are ignored (both inline ';' comments and COMMENT blocks), and
alint is case insensitive.
All references are stored in memory, and this is a small-model
program. There is obviously some limit to the total number of
data references that alint can handle, but I haven't run into it
ALINT is a copyrighted work. However, the copyright owner
hereby grants you a license to: use the program on one or more
machines; make as many copies of the program and documentation
as you wish for yourself and others; and distribute the program
and documentation via electronic or other means.
HOWEVER, YOU MAY NOT SELL THE PROGRAM OR ANY MODIFICATION OF IT,
REQUEST DONATIONS FOR DISTRIBUTION OF THE PROGRAM, OR IN ANY
OTHER WAY TRY TO MAKE MONEY FROM MY WORK. I MEAN IT.
A limited exception to the above is granted to RECOGNIZED
USERS' GROUPS ONLY, which are authorized to charge a reasonable
fee to cover the cost of media, postage, and handling only.
If you do give away copies of ALINT, you MUST distribute the
program and documentation together. This notice must not be
I do not warrant that ALINT does anything worthwhile or that
this document is accurate. I am not liable for any damages of
any kind related to the use of the program. By using the
software, you agree to this.
ALINT and this document are
Copyright (c) 1986 by
Christopher J. Dunford
10057-2 Windstream Drive
Columbia, MD 21044 USA