Category : Recently Uploaded Files
Archive   : EMILY52.ZIP
Filename : ASM51.DOC

Output of file : ASM51.DOC contained in archive : EMILY52.ZIP


8051 Cross assembler

Users Guide

Release 2.4

Revised 06-Oct-94

Copyright 1983-1994 Dave Dunfield
All rights reserved
XASM Cross Assemblers Page: 1


This single XASM package includes a cross assembler, and two
utility programs:

asm51 - 8051/8052 Assembler (also 803x, 873x, 875x)
hexfmt - HEX file manipulator
macro - Macro pre-processor

The XASM "package" (software and documentation) is copyrighted,
and may not be re-distributed without my written permission. If you
find XASM useful, please help me continue to support and enhance it
by ordering the complete package using the order form in the enclosed

XASM is provided on an "as is" basis, with no warranty of any
kind. In no event shall the author be liable for any damages arising
from its use or distribution.

Throughout this document, angle braces ('<>') are used to indicate
operands for which a value must be supplied by the user. Square
braces ('[]') are used to identify operands which are optional.
XASM Cross Assemblers Page: 2


All of the cross assemblers read a source file (.ASM), and produce
a code file (.HEX) containing either MOTOROLA or INTEL format
ASCII-HEX download records. A optional listing file (.LST) may also

be produced.

2.1 Using the assemblers

Any assembler is invoked by entering its name at the command
prompt, in the following format:

ASMxx [options]

The operand is the name of the file to be assembled,
it is assumed to have the extension ".ASM" if none is supplied.

Unless otherwise specified, the code produced by the assembler
is written to a file with the name '.HEX', and the
listing is written to a file with the name '.LST'.

2.1.1 Command line options

The following options may be specified on the command line,
following the operand:

-A - [A]bsolute jumps/calls

This directive causes the ASM51 to use AJMP/ACALL
instructions in place of LJMP/LCALL.

-C - [C]ase sensitive

Causes the assembler to make a distinction between
upper and lower case characters in symbol names. If this
options is not used, the assembler will ignore case
differences, and assume that the symbols are the same.
NOTE: When using this options, you must enter any register
names in UPPER case.

C= - Specify [C]ode file

This option allows you to specify the file to which the
output code is written. If no extension is supplied as
part of , it defaults to ".HEX".

-F - Generate [F]ull listing

Causes the assembler to output a full source listing to
the '.LST' file. By default, only lines containing errors
are written to the listing file.

-I - Generate [I]ntel format HEX file

Causes the assembler to output the code to the '.HEX'
file in INTEL hex format. By default the code is written
to the file in MOTOROLA hex format.
XASM Cross Assemblers Page: 3

L= - Specify [L]isting file

This option allows you to specify the file to which the
listing is written. If no extension is supplied as part of
, it defaults to ".LST".

P= - Set page length

This options specifies the number of lines which will
be printed on each page. The default number of lines per
page is 60.

-Q - [Q]uiet mode

Causes the assembler to be quiet, inhibiting the
display of the progress messages.

-S - Generate [S]ymbol table

Causes the assembler to sort and display the symbol
table at the end of the listing file. By default, the
symbol table is not displayed.

-T - Output to [T]erminal

Causes the assembler to output the listing to the
terminal, (via stdout) instead of the usual '.LST' file.

W= - Set page width

This options control the number of columns which will
be used for the printing of page titles and the symbol
table listing. Default page width is 80 columns.
XASM Cross Assemblers Page: 4

2.2 Redirecting the listing file

When the listing file is directed to the terminal with the '-t'
option on the command line, it is displayed through the standard
output file, allowing it to be redirected to a printer etc. via
the shell '>' redirection operator (EG: ASMxx filename -f -t
>LPT1:). The progress messages ('First pass...' etc) are output
through stderr, and will therefore not be redirected with the

2.3 Source file format

The assembly source input lines are in the following format: