home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / a86d86-1.zip / A00.DOC next >
Text File  |  1990-01-25  |  14KB  |  304 lines

  1. A86 assembler package   V3.22           January 25, 1990
  2.  
  3. The entire package is Copyright 1986--1990 Eric Isaacson.
  4. All rights reserved.
  5.  
  6. PLEASE read Chapter 1 for legal terms and conditions, how to 
  7. register for the package, and the overview of the assembler. 
  8.  
  9. This manual is huge!  A note about printing it occurs at
  10. the bottom of the next page.
  11.  
  12. If you have never heard of "shareware", and you purchased 
  13. this disk from XYZ Software House, that advertises great 
  14. software for $5 per disk, you may now be asking the following
  15.  
  16. QUESTION: "What's going on here?  Have I already bought an 
  17.   assembler, or what?" 
  18.  
  19. ANSWER: Well, no, not exactly.  You've bought a disk that has 
  20.   great software on it; you haven't bought the software yet. 
  21.   A86, like the vast majority of software offered by the $5-
  22.   per-disk distribution houses, is free-distribution software 
  23.   (also known as "shareware", or "user-supported software").  
  24.   That means I retain the rights to A86, but I choose to let 
  25.   people pass it around.  I have no business relationship 
  26.   with any distribution houses in the U.S.; I don't get a 
  27.   penny of the $5 (or whatever) you paid them for the disk 
  28.   containing A86.  So I need and expect to be paid by you, 
  29.   because I make my living out of making and supporting
  30.   shareware products. 
  31.  
  32.   A few distribution houses do a pretty poor job of revealing 
  33.   the shareware nature of the software they sell.  If you 
  34.   thought you had purchased the software free and clear, you 
  35.   might feel justified in being angry with them for having 
  36.   misled you.  And you might look around for houses that do a 
  37.   better job of informing the public.  But I hope you'll take 
  38.   the time to consider everybody's role in the shareware 
  39.   marketing scene; if you do, I think you'll conclude that 
  40.   although you may have been misled, you haven't really been 
  41.   cheated out of anything. 
  42.  
  43.   Shareware is great for authors like me, who have spent all 
  44.   their years in their computer holes, learning to be great 
  45.   programmers, and no time in business school learning 
  46.   marketing and distribution techniques.  We simply cast our 
  47.   programs to the winds.  They are distributed at practically 
  48.   no cost to us.  That's why we can charge less than 
  49.   the cost of "commercial" software. 
  50.                                                         0-2
  51.   Shareware is also great for customers like you.  You can 
  52.   try out the software before paying for it.  You'll know 
  53.   that a successful shareware product is good, because only 
  54.   satisfied customers pay for it.  The existence of shareware 
  55.   infuses healthy competition in the entire software market, 
  56.   for both price and quality.  In the case of A86, I'm 
  57.   utterly convinced that you'll never find a better value for 
  58.   an assembler, anywhere. 
  59.  
  60.   Finally, let's consider the distribution houses.  They 
  61.   provide a legitimate service, for which they charge a 
  62.   reasonable price.  The best houses act as librarians, 
  63.   evaluating and cataloguing software.  Most pay thousands of 
  64.   dollars for advertising.  Their cut is far less than the 
  65.   distributor's cut for "commercial" software (they prosper 
  66.   because their volume is bigger).  Most customers for the 
  67.   distribution houses are repeat customers, who are aware of, 
  68.   and happy with, what they are getting.  If it weren't for 
  69.   your XYZ House, you might never have heard of A86, or might 
  70.   never have figured out where to obtain it. 
  71.  
  72.   So I hope you'll be happy with shareware, and actively 
  73.   desire to support it.  You'll feel good about promoting a 
  74.   healthy situation for everybody.  And you'll encourage the 
  75.   best programmers in the world to keep writing for you, 
  76.   instead of for the big corporations. 
  77.  
  78.  
  79. Now that I've said that, let's move on to the package.   The 
  80. A86 package consists of the four programs A86.COM, XREF.COM, 
  81. EXMAC.COM, and FAKE.EXE; a collection of source, batch, and 
  82. library files used by the demonstration contained in Chapter 
  83. 2, and a sequence of DOC files that, when printed out in 
  84. order, make the manual.  Each chapter is a DOC file whose 
  85. name is A??.DOC, where ?? runs from 00 though 17.  Exception: 
  86. chapter 6 is split into A06A.DOC and A06B.DOC.  The second 
  87. file is wider, and should be printed at 12 cpi if you can 
  88. manage it.  The other files can print at 10cpi with margins--
  89. You should set your printer to a 1-inch left margin, as the
  90. DOC files do not attempt to provide a left margin for you.
  91. (You can modify the PAGE.8 program to output the appropriate
  92. codes!)
  93.  
  94.                                                         0-3
  95. TABLE OF CONTENTS
  96.  
  97.  
  98. CHAPTER 1   INTRODUCTION AND LEGAL TERMS
  99.  
  100.   Introduction                             1-1
  101.   Legal Terms and Conditions               1-1
  102.   Registration Benefits                    1-3
  103.   Overview of A86                          1-4
  104.   About the Author                         1-6
  105.   How to Contact Me                        1-6
  106.  
  107.  
  108. CHAPTER 2   A86 DEMONSTRATION
  109.  
  110.   Demonstration of A86 and Associated Tools                 2-1
  111.   Assembling a Very Short Program: PAGE.COM                 2-1
  112.   Demonstration of Error-Reporting                          2-1
  113.   Assembling a Longer Program with Library Files: REV.COM   2-1
  114.   Using XREF on a medium-sized program: TCOLS.COM           2-2
  115.   Using EXMAC                                               2-2
  116.  
  117.  
  118. CHAPTER 3   OPERATION AND REQUIREMENTS
  119.  
  120.   Creating Programs to Assemble             3-1
  121.   Program Invocation                        3-1
  122.   Assembler Switches                        3-2
  123.   The A86 Environment Variable              3-4
  124.   Using Standard Input as a Command Tail    3-5
  125.   Strategies for Source File Maintenance    3-6
  126.   System Requirements for A86               3-6
  127.  
  128.  
  129. CHAPTER 4   ELEMENTS OF THE A86 LANGUAGE
  130.  
  131.   The A86 Language and the A86 Program               4-1
  132.   General Categories of A86 Elements                 4-1
  133.   Operand Typing and Code Generation                 4-3
  134.   Registers                                          4-3
  135.   Variables                                          4-3
  136.   Labels                                             4-4
  137.   Constants                                          4-4
  138.   Generating Opcodes from General Purpose Mnemonics  4-4
  139.  
  140.  
  141. CHAPTER 5   SOME EXCLUSIVE FEATURES OF A86
  142.  
  143.   The IF Statement                                 5-1
  144.   Multiple operands to PUSH, POP, INC, DEC         5-1
  145.   Conditional Return Instructions                  5-2
  146.   A86 extensions to the MOV and XCHG instructions  5-2
  147.   Local Symbols                                    5-3
  148.   Operands to AAM and AAD Instructions             5-4
  149.   Single-Operand Forms of the TEST Instruction     5-4
  150.   Optimized LEA Instruction                        5-4
  151.                                                            0-4
  152. CHAPTER 6    THE 86 INSTRUCTION SET
  153.  
  154.   Effective Addresses                            6-1
  155.   Segmentation and Effective Addresses           6-2
  156.   Effective Use of Effective Addresses           6-3
  157.   Encoding of Effective Addresses                6-4
  158.   Table of Effective Address byte values         6-5
  159.   How to Read the Instruction Set Chart          6-6
  160.   The Instruction Set Chart                      6-8
  161.  
  162.  
  163. CHAPTER 7   THE FLOATING-POINT PROCESSOR
  164.  
  165.   The 8087 and 287 Coprocessors          7-1
  166.   Extra Coprocessor Support              7-2
  167.   Emulating the 8087 by Software         7-2
  168.   The Floating Point Stack               7-3
  169.   Floating Point Initializations         7-3
  170.   Built-In Constant Names                7-4
  171.   Special Immediate FLD Form             7-4
  172.   Floating Point Operand Types           7-5
  173.   Operand Choices in A86                 7-6
  174.   The 87 Instruction Set                 7-6
  175.  
  176.  
  177. CHAPTER 8   NUMBERS AND EXPRESSIONS
  178.  
  179.   Numbers and Bases                      8-1
  180.   The RADIX Directive                    8-2
  181.   Floating-point Initializations         8-3
  182.   Overview of Expressions                8-3
  183.   Types of Expression Operands           8-4
  184.   Numbers and Label Addresses            8-4
  185.   Variables                              8-4
  186.   Index Expressions                      8-4
  187.   Arithmetic Operators                   8-4
  188.   HIGH/LOW                               8-4
  189.   BY                                     8-5
  190.   Addition (combination)                 8-5
  191.   Subtraction                            8-6
  192.   Multiplication and Division            8-6
  193.   Shifting Operators                     8-6
  194.   Logical Operators                      8-7
  195.   Boolean Negation Operator              8-7
  196.   Relational Operators                   8-8
  197.   String Comparison Operators            8-8
  198.   Attribute Operators/Specifiers         8-9
  199.   B,W,D,Q,T Memory Variable Specifiers   8-9
  200.   SHORT and LONG operators               8-9
  201.   OFFSET operator                       8-10
  202.   NEAR Operator                         8-11
  203.   Square Brackets Operator              8-11
  204.   Colon Operator                        8-11
  205.   ST Operator                           8-12
  206.   TYPE Operator                         8-12
  207.   THIS and $ Specifiers                 8-12
  208.   Operator Precedence                   8-13
  209.                                                          0-5
  210. CHAPTER 9   DIRECTIVES IN A86
  211.  
  212.   Segments in A86                                 9-1
  213.   CODE ENDS and DATA ENDS Statements              9-2
  214.   The ORG Directive                               9-2
  215.   The EVEN Directive                              9-3
  216.   Data Allocation Using DB, DW, DD, DQ, and DT    9-3
  217.   The STRUC Directive                             9-6
  218.   Forward References                              9-6
  219.   Forward References in Expressions               9-7
  220.   The EQU Directive                               9-8
  221.   Equates to Built-In Symbols                     9-9
  222.   The NIL Prefix                                  9-9
  223.   Interrupt Equates                               9-9
  224.   Duplicate Definitions                           9-9
  225.   The = Directive                                9-10
  226.   The PROC Directive                             9-10
  227.   The ENDP Directive                             9-11
  228.   The LABEL Directive                            9-11
  229.  
  230.  
  231. CHAPTER 10   RELOCATION AND LINKAGE
  232.  
  233.   .OBJ Production Made Easy                          10-1
  234.   Overview of Relocation and Linkage                 10-3
  235.   The NAME Directive                                 10-5
  236.   The PUBLIC Directive                               10-5
  237.   The EXTRN Directive                                10-6
  238.   MAIN: The Starting Location for a Program          10-7
  239.   The END Directive                                  10-7
  240.   The SEGMENT Directive                              10-8
  241.   DATA SEGMENT, STRUC and CODE SEGMENT Directives   10-11
  242.   The ENDS Directive                                10-11
  243.   Default Outer SEGMENT                             10-12
  244.   The GROUP Directive                               10-12
  245.   The SEG Operator                                  10-13
  246.                                                             0-6
  247. CHAPTER 11   MACROS AND CONDITIONAL ASSEMBLY
  248.  
  249.   Macro Facility                                     11-1
  250.   Simple Macro Syntax                                11-1
  251.   Formatting in macro definitions and calls          11-2
  252.   Macro operand substitution                         11-2
  253.   Quoted-string operands                             11-3
  254.   Looping by operands in macros                      11-4
  255.   The #L last operator and indefinite repeats        11-5
  256.   Character-loops                                    11-5
  257.   The "B"-before and "A"-after operators             11-6
  258.   Multiple-increments within loops                   11-6
  259.   Negative R-loops                                   11-7
  260.   Nesting of loops in macros                         11-8
  261.   Implied closing of loops                           11-8
  262.   Passing Operands by Value                          11-8
  263.   Passing Operand Size                               11-8
  264.   Generating the Number of an Operand                11-9
  265.   Parenthesized Operand Numbers                      11-9
  266.   Exiting from the Middle of a Macro                11-10
  267.   Local labels in macros                            11-10
  268.   Debugging macro expansions                        11-11
  269.   Conditional Assembly                              11-11
  270.   Conditional Assembly and Macros                   11-13
  271.   Simulating MASM's Conditional Assembly Constructs 11-14
  272.   Conditional Assembly and the XREF Program         11-14
  273.   Declaring Variables in the Assembler Invocation   11-14
  274.   Null Invocation Variable Names                    11-15
  275.   Changing Values of Invocation Variables           11-15
  276.  
  277.  
  278. CHAPTER 12   COMPATIBILITY WITH OTHER ASSEMBLERS
  279.  
  280.   Conversion of MASM programs to A86                12-1
  281.   Compatibility-symbols recognized by A86           12-4
  282.   Conversion of A86 Programs to Intel/IBM/MASM      12-5
  283.  
  284.  
  285. CHAPTER 13   ASSOCIATED TOOLS
  286.  
  287.   XREF Cross-reference and Symbol Listing Facility    13-1
  288.   EXMAC Macro Expansion Tool                          13-2
  289.   A86LIB Source File Library Tool                     13-3
  290.   Using A86.LIB in A86 Assemblies                     13-4
  291.   Environment Variable A86LIB                         13-5
  292.   Forcing a Library Search                            13-5
  293.   Listings with A86                                   13-5
  294.   Mimicking Tool: FAKE.EXE                            13-7
  295.  
  296. CHAPTER 14   DESCRIPTIONS OF A86 ERROR MESSAGES
  297.  
  298. CHAPTER 15   RELEASE HISTORY OF A86
  299.  
  300. CHAPTER 16    RESERVED SYMBOLS IN THE A86 LANGUAGE
  301.  
  302. INDEX
  303.  
  304.