C51ASM User Guide 3710A–MICRO–10/10 Table of Contents

C51ASM User Guide 3710A–MICRO–10/10 Table of Contents

C51ASM .................................................................................................................... User Guide 3710A–MICRO–10/10 1-2 C51ASM User Guide 3710A–MICRO–10/10 Table of Contents Section 1 Introduction.................................................................................................................1-1 1.1 References......................................................................................................................... 1-1 Section 2 Running the Assembler ..............................................................................................2-1 2.1 Installation.......................................................................................................................... 2-1 2.1.1 Installation under Microsoft Windows .................................................................. 2-1 2.1.2 Installation under Linux........................................................................................ 2-6 2.2 Environment....................................................................................................................... 2-7 2.2.1 Microsoft Windows Environment ......................................................................... 2-7 2.2.2 Linux Environment............................................................................................... 2-7 2.3 Command Line Operation.................................................................................................. 2-8 2.3.1 Output Files ......................................................................................................... 2-9 2.3.2 Command Line Options..................................................................................... 2-10 2.4 Batch File Operation ........................................................................................................ 2-19 2.4.1 Drag–and–Drop ................................................................................................. 2-19 2.4.2 Send To Menu ................................................................................................... 2-19 Section 3 C51ASM Assembly Language ...................................................................................3-1 3.1 Statements......................................................................................................................... 3-1 3.2 Comments.......................................................................................................................... 3-1 3.3 Symbols ............................................................................................................................. 3-2 3.3.1 Labels .................................................................................................................. 3-2 3.3.2 Predefined Symbols............................................................................................. 3-3 3.4 Constants........................................................................................................................... 3-4 3.5 Expressions ....................................................................................................................... 3-6 3.6 Segment Type.................................................................................................................... 3-7 3.7 The 8051 Instruction Set.................................................................................................... 3-9 3.8 Assembler Directives ....................................................................................................... 3-10 3.9 Assembler Controls.......................................................................................................... 3-12 3.10 Conditional Assembly ...................................................................................................... 3-14 Section 4 Macro Processing.......................................................................................................4-1 4.1 Standard Callable Macros.................................................................................................. 4-1 C51ASM User Guide i 3710A–MICROC–10/10 Table of Contents (Continued) 4.1.1 Defining Macros................................................................................................... 4-1 4.1.2 Calling Macros..................................................................................................... 4-2 4.1.3 Macro Parameters ............................................................................................... 4-3 4.1.4 Local Symbols ..................................................................................................... 4-4 4.1.5 Macro Operators.................................................................................................. 4-5 4.1.6 Exiting Macro Expansion ..................................................................................... 4-8 4.2 Repeat Macros................................................................................................................... 4-8 4.3 Nested and Recursive Macro Calls.................................................................................... 4-9 4.4 Nested Macro Definitions................................................................................................. 4-10 Section 5 Assembler Directives..................................................................................................5-1 5.1 DB...................................................................................................................................... 5-3 5.2 DW..................................................................................................................................... 5-3 5.3 DS...................................................................................................................................... 5-4 5.4 DBIT................................................................................................................................... 5-4 5.5 DEFINE.............................................................................................................................. 5-5 5.6 NAME................................................................................................................................. 5-5 5.7 ORG................................................................................................................................... 5-6 5.8 USING................................................................................................................................ 5-6 5.9 END ................................................................................................................................... 5-7 5.10 EQU ................................................................................................................................... 5-7 5.11 CODE................................................................................................................................. 5-8 5.12 DATA ................................................................................................................................. 5-8 5.13 SFR.................................................................................................................................... 5-9 5.14 BIT ..................................................................................................................................... 5-9 5.15 IDATA .............................................................................................................................. 5-10 5.16 EDATA............................................................................................................................. 5-10 5.17 FDATA ............................................................................................................................. 5-11 5.18 XDATA............................................................................................................................. 5-11 5.19 CSEG............................................................................................................................... 5-12 5.20 DSEG............................................................................................................................... 5-12 5.21 ISEG ................................................................................................................................ 5-13 5.22 ESEG............................................................................................................................... 5-13 5.23 FSEG ............................................................................................................................... 5-14 5.24 BSEG............................................................................................................................... 5-15 5.25 XSEG............................................................................................................................... 5-15 5.26 SET.................................................................................................................................. 5-16 5.27 #UNDEF........................................................................................................................... 5-17 5.28 IF...................................................................................................................................... 5-17 5.29 IFN ..................................................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    199 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us