📄 asem_51.doc
字号:
MCS-51 Microcontroller Family Cross Assembler
AAA SSSSSS EEEEEEE MM MM 5555555 11
AA AA SS EE MMM MMM 55 111
AA AA SS EE MM M MM 55 11
AA AA SSSSS EEEEEEE MM MM ==== 555555 11
AAAAAAA SS EE MM MM 55 11
AA AA SS EE MM MM 55 11
AA AA SSSSSS EEEEEEE MM MM 555555 1111
U S E R ' S M A N U A L
Version 1.2
January 22, 1996
Copyright (c) 1994, 1996 by W.W. Heinz
TABLE OF CONTENTS
-----------------
Foreword to Version 1.0
Foreword to Version 1.2
I. Introduction
II. Getting started
II.1 Files
II.2 ASEM-51 Installation
II.3 Invoking ASEM
II.3.1 DOS Command Line Operation
II.3.2 Running ASEM-51 in the Borland-IDE
II.3.3 Running ASEM-51 from Windows 3.1
II.3.4 Running ASEM-51 from BRIEF
II.3.5 Running ASEM-51 in a UNIX Environment
II.4 The HEXBIN Utility
II.5 The DEMO Program
III. The ASEM-51 Assembly Language
III.1 Statements
III.2 Symbols
III.3 Constants
III.4 Expressions
III.5 The 8051 Instruction Set
III.6 Pseudo Instructions
III.7 Segment Type
III.8 Assembler Controls
III.8.1 Primary Controls
III.8.2 General Controls
III.9 Predefined Symbols
III.10 Conditional Assembly
IV. Compatibility with the Intel Assembler
IV.1 Restrictions
IV.2 Extensions
IV.3 Further Differences
V. List File Format
VI. Support of 8051 Derivatives
Appendix A: ASEM-51 Error Messages
A.1 Assembly Errors
A.2 Runtime Errors
Appendix B: HEXBIN Error Messages
B.1 Conversion Errors
B.2 Runtime Errors
Appendix C: Predefined Symbols
Appendix D: Reserved Keywords
Appendix E: Specification of the Intel-HEX Format
Appendix F: The ASCII Character Set
Appendix G: Literature
Appendix H: Trademarks
Appendix I: 8051 Instructions in numerical Order
Appendix J: 8051 Instructions in lexical Order
Foreword to Version 1.0
=======================
Today microcontrollers are used in a wide range of applications from simple
consumer electronic products to complex avionic components. Thus I was not
very surprised to find an 80C31 on the videotext decoder board, I purchased
some time ago. Since it had a poor user interface and many bugs, I thought
I could do it better and so I began to look for an 8051 cross assembler.
But in contrast to the huge number of hardware components sold, the number
of people developing microcontroller software seemed to be remarkable small,
and so was the number of development tools on the market.
There was a very small number of good professional cross assemblers for $250
and up - too expensive for hobby purposes. Aside of useless demos, there were
no restricted starter kits or school versions available.
I found also a few shareware and public domain assemblers. But either they
were poor and not very reliable, or not very 8051-specific, or they used some
kind of fantasy syntax that was 100 % compatible to itself, but far away from
the Intel standard. I didn't like them all!
There seems to be a general lack of useful and affordable microcontroller
development software. This is a pity, because their universality, simple
architectures and low prices make microcontrollers so interesting especially
for hobby and education.
So I decided to write a handy 8051 cross assembler for the PC.
And here it is: ASEM-51 V1.0
I hope it will help to discover the wonderful world of microcontrollers.
Have fun!
Deisenhofen, July 19, 1994
W.W. Heinz
Foreword to Version 1.2
=======================
More than one year has passed, since I had released ASEM-51 V1.1 in
October 1994. Although I didn't spend all the time on ASEM-51, V1.2
comes with several extensions, bug fixes, and numerous functional or
internal improvements!
Highlights of the new version are a nearly perfectly featured list
file with cross-reference and some new printing options, a bootstrap
program for MCS-51 evaluation boards, and plenty of new *.MCU files.
For detailed information see the ASEM-51 V1.2 Release Notes.
What I have learned through the last two years is that freeware is
not free, neither for the author nor for the users.
ASEM-51 could not be made with nothing but numberless free hours,
spent on pure software development. I also had to purchase a PASCAL
development system, lots of microcontroller literature, and an 80C535
evaluation board.
The distribution of freeware seems to be a bigger problem than its
development. First of all, one has to buy a modem. After that, it
costs a lot of time, fees, trouble, and "interesting" discussions
with the particular sysops, until the stuff is posted (or not) on
several BBS and ftp sites.
To publish a program on shareware CD-ROMs, one has only to find out,
which are the most suitable. For this, it is best to buy a dozen or
two (and a CD-ROM drive), and to send the software to the publishers
of those that seem to be the most popular.
The interested users finally have to purchase modems or CD-ROM drives,
and pay the same fees, or buy the same CD-ROMs, to get the "freeware"
again from these public sources.
After all, it may be cheaper, faster, and more convenient, to simply buy
a professional software solution (if any) in the PC shop at the corner.
But it's not half the fun!
ASEM-51 V1.1 had been distributed (and mirrored) to more than 60 ftp
sites all over the world, uploaded to so many BBS, and published on
at least two shareware CD-ROMs.
But I only received mails from 9 users, a local cockroach, and an
international monster. The latter two asked me for permission, to
sell ASEM-51 for (their) profit, and failed miserably.
Most of the user mails started with "I have copied your assembler
from an ftp site, which I don't remember. It is looking fine on the
first glance! By the way, have you got a data sheet of the 80Cxyz?",
or something like that.
During all the time, I have received one single error report only.
Since it had been reported by phone, I couldn't reproduce it.
Nevertheless two serious bugs have been fixed since version 1.1, but
I have found them by myself in November 1995 both.
Sure ASEM-51 is no mainstream software, but to be honest, I am a
little disappointed of the poor user feedback!
Finally, I should thank the persons, who helped me to release ASEM-51:
Andreas Kies has tested all previous beta versions of the assembler. He
has distributed the first releases, and maintained a free ASEM-51 support
account right from the beginning.
Gabriele Novak has checked the orthography of all the documentation files.
Werner Allinger has tested the latest beta version and the bootstrap program.
Last but not least, I want to thank all interested users for their comments
and suggestions.
Deisenhofen, January 22, 1996
W.W. Heinz
I. Introduction
===============
ASEM-51 is a generic two-pass cross assembler for the MCS-51 microcontroller
family. It is running on IBM-PC/XT/AT computers and all true compatibles.
It only requires 256K of memory and MS-DOS 2.0 (or higher).
The ASEM-51 assembly language is a subset of the Intel standard that
guarantees maximum compatibility with existing 8051 assembler sources.
ASEM-51 generates an Intel-HEX file output, which is directly accepted by
most EPROM blowers. Thus ASEM-51 is suitable for small and medium 8031/51-
based microcontroller projects in the non-profit area.
However, ASEM-51 has been designed to process also very large programs!
Its most important features are:
- fast, compact, reliable, easy to use, and well-documented
- easy installation, no configuration required
- command line operation, batch and networking capability
- support for easy integration into the popular Borland IDE
- support for installation under Windows 3.1
- Intel-compatible syntax
- five location counters, one for each of the 8051 address spaces
- built-in symbols for 8051 special function registers (can be disabled)
- 8051 register bank support
- assembly-time evaluation of arithmetic and logical expressions
- segment type checking for instruction operands
- automatic code optimization of generic jumps and calls
- nested include file processing
- nested conditional assembly
- detailed assembler listing with symbol table or cross reference
- further fancy printing facilities ;-)
- Intel-HEX file output
- hex-to-binary conversion utility
- direct support of more than thirty 8051 derivatives
- support of user-defined 8051 derivatives
- special support of the Philips 83C75x family
- bootstrap program for testing on the MCS-51 target board
- limited update service by the author
- also running under OS/2 2.x and Warp (in the DOS window)
- also running under Windows 3.1 and 95 (in the DOS box)
- also running under LINUX 1.1.12 and up (with dosemu 0.52 and up)
- YES, it runs with Novell DOS 7.
All executable programs of the ASEM-51 package have been developed with:
Turbo-Pascal 7.01 for DOS (c) Borland International 1992
II. Getting started
===================
II.1 Files
----------
Your ASEM-51 distribution disk or archive should contain the following
groups of files:
1.) ASEM_51.DOC ASEM-51 User's Manual (this file)
ASEM.EXE cross assembler
ASEM.PIF program information file for Windows 3.1
ASEM.ICO icon file for Windows 3.1
ASEM2MSG.EXE ASEM-51 message filter for Borland-IDE
ASEM2MSG.PAS Turbo-Pascal source of ASEM2MSG.EXE
HEXBIN.EXE hex-to-binary conversion utility
DEMO.A51 a sample 8051 assembler program
*.MCU processor definition files of 8051 derivatives
(for a detailed list of MCU files see chapter
"VI. Support of 8051 Derivatives")
2.) BOOT51.DOC BOOT-51 user's manual
BOOT51.A51 BOOT-51 assembler source (requires ASEM-51 V1.2)
CUSTOMIZ.EXE BOOT-51 customization utility
BOOT.BAT batch file for application program upload
LOAD.BAT called by BOOT.BAT only
RESET.EXE program to reset target system via PC printer port
BLINK.A51 sample test program for BOOT-51
3.) LICENSE.DOC ASEM-51 License Agreement
RELEASE.120 ASEM-51 V1.2 Release Notes
UPDATES.DOC ASEM-51 Updating Guide
KILLASEM.BAT deletes all files of the ASEM-51 package
FILE_ID.DIZ a brief description of the ASEM-51 archive
The first group contains all files directly associated with the assembler.
The second group contains all files directly associated with the bootstrap
program. The third group contains general support and documentation files
that apply to the whole package.
II.2 ASEM-51 Installation
-------------------------
In principle ASEM-51 doesn't require a fuzzy software installation or
configuration. In the simplest case you can copy all files of the package
to your working directory, and enjoy the benefits of true plug-and-play
compatibility!
On the other hand, an installation of ASEM-51 under MS-DOS is very simple:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -