RixASM51 PC-8051 Assembler

User Guide

Version 1.0

Copyright (c)1991-1998
By Eamonn F. Martin
All rights reserved

Table of Contents

USAGE

ASM51 command infile outfile

COMMANDS

A
Assemble and link assembler mnemonics in ASCII source file. Creates a copy of the source file with assembled codes inserted.
B
Assemble and link assembler mnemonics in ASCII source file. Creates a downloadable binary program file.
C
Assemble assembler mnemonics in ASCII source file. Creates a relocatable (unlinked) object-code module.
L
Link a compiled, relocatable object module. Creates a downloadable binary program file.
P
Open ASCII-text project file containing a list of object modules and link all modules. Creates a downloadable binary program file.
R
Open ASCII-text project file containing a list of program modules and rebuild all modules. Creates a downloadable binary program file.
M
Conditionally create a downloadable binary program file. First compares dates of object-code and source files named in project file and reassembles any updated source. Then compares dates of program, project file and object modules and relinks the program if any object modules, or the project file, have been updated.
Infile...: Input file name (default extensions: .ASM/.OBJ/.PRJ)
Outfile..: Output file name (default extensions: .ASC/.OBJ/.BIN)

NOTES ON THE ASSEMBLER

The assembly language conventions used by the ASM51 assembler were derived from the Intel 8-Bit Embedded Controller Handbook (1991), with the following exception:

The 'clear bit' instructions (CLR and CLR C) are defined as CLRB, to complement the SETB instructions. The 'clear accumulator' instruction remains as CLR A.
The following pseudo-ops are supported: EQU, ORG, DB, DUP

Literal numeric values may be entered in decimal (the default), binary or hexadecimal. Thus, ten is 10 or 1010b or 0Ah. All numbers must begin with an ASCII digit (0 to 9).

Expressions may include data symbols as well as literal values, and the division (/), multiplication (*), addition and subtraction operators. Parentheses ( '(' and ')' ) may be used to override operator precedence. Spaces and tabs are not allowed within expressions.

Labels must be placed at the start of a new line. They may be any length, but only the first sixteen characters are significant. Unconditional jumps and call instructions must have a label as a target.

If no label is required, a space or tab must be placed at the start of a new line.

The assembler is entirely case-insensitive; thus, acc, ACC and Acc are treated as identical symbols.

Each source-code line has a maximum length of 255 characters.

The following data symbols, representing the addresses of the Special Function Registers, are pre-defined.

	P0	80h	SP	81h	DPL	82h	DPH	83h
	PCON	87h	TCON	88h	TMOD	89h	TL0	8Ah
	TL1	8Bh	TH0	8Ch	TH1	8Dh	P1	90h
	SCON	98h	SBUF	99h	P2	A0h	IE	A8h
	P3	B0h	IP	B8h	T2CON	C8h	RCAP2L	CAh
	RCAP2H	CBh	TL2	CCh	TH2	CDh	PSW	D0h
	ACC	E0h	B	F0h


PROJECT FILES

A project file is just an ordinary text file containing a list of object- code filenames, one per line. The default filename extension is .OBJ. The use of project files allows large programs to be broken down into smaller modules. It also saves time when using the project-make (M) command, as only modules which have been modified will be recompiled.

DEFAULT FILENAME EXTENSIONS

The assembler assumes a variety of different default extensions for the input and output files, depending on the command parameter given.

    Input files				 Output files
   ----------------------------------------------------------------------
   .ASM  - Assembler source file	.ASC  - ASCII program file
   .OBJ  - Relocatable object module	.OBJ  - Relocatable object module
   .PRJ  - Project file list		.BIN  - Binary program file
   ----------------------------------------------------------------------