⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asem_51.doc

📁 一份51的编译程序,dos版本的. 英文名字MCS-51 Microcontroller Family Macro Assembler
💻 DOC
📖 第 1 页 / 共 5 页
字号:




                MCS-51 Microcontroller Family Macro 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.3




                              December 31, 2002

















             Copyright (c) 1994, 1996, 2002  by  W.W. Heinz



                          TABLE OF CONTENTS
                          -----------------


      Foreword to Version 1.0
      Foreword to Version 1.2
      Foreword to Version 1.3

I.    Introduction

II.   Getting started

      II.1  DOS and Windows Implementation
            II.1.1  Files
            II.1.2  Installation under MS-DOS or Windows
            II.1.3  DOS Command Line Operation
            II.1.4  DOS Environment
            II.1.5  Running ASEM-51 in the Borland-IDE
            II.1.6  Running ASEM-51 from Windows 3.1x
            II.1.7  Running ASEM-51 from BRIEF
            II.1.8  The DOS Protected-Mode Assembler ASEMX
            II.1.9  The Win32 Console-Mode Assembler ASEMW
            II.1.10 The HEXBIN Utility
      II.2  Linux Implementation
            II.2.1  Files
            II.2.2  Installation under Linux
            II.2.3  Linux Command Line Operation
            II.2.4  Linux Environment
            II.2.5  The HEXBIN Utility
      II.3  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
             III.10.1 General IFxx Construction
             III.10.2 IFxx and ELSEIFxx Instructions
      III.11 Macro Processing
             III.11.1 Simple Callable Macros
             III.11.2 Macro Parameters
             III.11.3 Repeat Macros
             III.11.4 Local Symbols
             III.11.5 Macro Operators
             III.11.6 Premature End of a Macro Expansion
             III.11.7 Nested and Recursive Macro Calls
             III.11.8 Nested Macro Definitions
             III.11.9 Representation in the List File

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


Foreword to Version 1.3
=======================

Six years have passed since I had released version 1.2.
I'm almost sure that most of my users thought that this was the last one!
It seems that I had always some spare time to support, maintain, change,
extend, improve and port ASEM-51 over and over for many years, but never
to publish an official new release.
But now, after six months of beta-testing, the time has come to unveil
ASEM-51 Version 1.3 (Final Release). The most important new features are

 - new host platforms: Win32 and Linux (386)
 - macro processing
 - dramatically improved conditional assembly
 - output in absolute OMF-51 format (with debug information)
 - 37 new MCU files
 - documentation in both ASCII and HTML format

For detailed information on the numerous small extensions, improvements,
and bug fixes, see the ASEM-51 V1.3 Release Notes.
Since fall 2001, ASEM-51 has an official home on the Internet, the
ASEM-51 support website:  http://plit.de/asem-51/

Credits:
Andreas Kies has tested all beta versions of the assembler. Without
his Linux-knowhow, the Linux port would have been a very hard job.
Werner Allinger has tested the latest beta version, and has provided
free webspace for the ASEM-51 website right from the beginning.
Axel Kielhorn has written the file DS5000.MCU.
Anders Sandstroem has sent me 87LPC762.MCU and 87LPC768.MCU.
Michael R. has contributed 80C32X2.MCU.
I also want to thank all the other users for their bug reports,
contributions, comments and suggestions.

                                     Bayreuth,  December 31, 2002

                                                       W.W. Heinz


I. Introduction
===============
ASEM-51 is a two-pass macro assembler for the Intel MCS-51 family of
microcontrollers.
It is running on the PC under MS-DOS, Windows, and Linux.
The DOS real-mode assembler ASEM.EXE requires only 256 kB of free DOS memory
and MS-DOS 3.0 (or higher).
The new protected-mode assembler ASEMX.EXE requires a 286 CPU (or better),
and at least 512 kB of free XMS memory.
The new Win32 console-mode assembler ASEMW.EXE requires a 386 CPU (or better)
and Windows 9x, NT, 2000 or XP.
The new Linux assembler asem requires a 386-based Linux system.
The new HTML documentation set requires a 90 MHz Pentium (or better) and a
web browser.

The ASEM-51 assembly language is a rich subset of the Intel standard that
guarantees maximum compatibility with existing 8051 assembler sources.
ASEM-51 can generate two sorts of object files: Intel-HEX format, which is
directly accepted by most EPROM programmers, and absolute OMF-51 format,
which is required for many simulators, emulators and target debuggers.
Thus ASEM-51 is suitable for small and medium MCS-51-based microcontroller
projects in hobby, education and business. 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, almost no configuration required

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -