CHAPTER 1 Introduction


A86 is the finest assembler available, at any cost under any terms, for the 86-family of microprocessors (IBM-PC, compatibles, and not-so-compatibles). In contrast to software firms who attempt to restrict the distribution of their products via protection-schemes, I encourage free distribution, and trust that those who use my products will pay for them. Please keep in mind the fundamental good spirit of free-distribution software as you endure the following barrage of legalities. Then evaluate the outstanding value that the A86 package offers you. I assure you that you will not be disappointed. Legal Terms and Conditions This package is provided to you under the following conditions: 1. You may copy the A86Vxxx.ZIP and D86Vxxx.ZIP files, and give them to anyone who accepts these terms. The copies you distribute must be complete and unmodified. You do not have to be registered to distribute this package. 2. Even if you have not yet obtained full execution rights, you may execute the programs in this package, in order to evaluate them. If you decide that any of this package is of use to you, you must become a registered user by sending $50 US ($52 if you are outside North America) to: Eric Isaacson 416 E. University Ave. Bloomington, IN 47401-4739 For your convenience, I now accept Visa and MasterCard, by telephone. My number is (812)339-1811. For the convenience of users in Great Britain, I have authorized the firm Shareware Marketing to collect registrations for me. We'll try to keep the prices about the same whether you register through me or through them; it's your choice. Their address is 87 High Street, Tonbridge, Kent TN9 1RX; telephone 0732 771344. They'll send me a list of registered users at the end of every month, and I'll send an acknowledgement to each user when I get the list. So if you haven't heard from me by the end of the month following your registration with them, please let me know.

1-2 Your registration includes a single update diskette (5.25 inch, double density), that also includes the A86LIB tool available to registered users only. You may order further updates for $10 US, or $12 US if you are overseas. Once you register for this package, you are registered for all future versions-- you have permanent rights to execute A86 on one computer. As long as I'm in business, you can get the latest version for just the update fee. I have a combination offer for the A86 and D86 packages. Instead of $50 + $50 = $100, I charge $80 ($82 overseas) for both. I also offer a printed version of this manual, covering both A86 and D86. The manual is printed on sheets 8.5 inches high and 7 inches wide, with a plastic ring-style binding so the book can lay flat. If you order with your registration the manual is an extra $10 to the U.S., $15 overseas. If you've already registered and now want the manual, add another $10 ($12 overseas) for the update disk that the manual is bundled with. There is a limit of one manual per computer registered (except you may reorder when there is a substantial revision to the manual). Indiana residents need to add sales tax. At the current rate of 5%, the prices for Indiana residents are $52.50 for one product, $63 one product with manual, $84 both products, $94.50 both products with manual, $21 manual if already registered. Educational institutions and training facilities MUST be registered in order to use A86 in courses. Contact me for special terms. Companies and government agencies MUST be registered in order to use A86 for their work. Again, contact me for special terms. 3. This package may not be sold to anyone. If the package is distributed this package on a diskette, any fees collected must be specified as materials/handling, and may not exceed $10 for the diskette. 4. The user is completely responsible for determining the fitness or usability of this package. I will not be liable for any damages, of any kind, arising from any failure of any programs in this package to perform as expected. 5. Only permanent registered users can sell or distribute any programs that you have written or modified using this assembler. If you do sell or distribute such programs, you must insure that your registered name (company or individual) will always be distributed with the program, so that I can verify your registration. Any individual or company found to be violating these terms will be liable for triple registration fees for every machine they own capable of

running my assembler (plus any legal and court costs).

1-3 NOTE that the only computers that need to be registered are those executing the program A86.COM. The programs produced by A86 are entirely yours-- there are no "run-time royalties". 6. A86 takes advantage of situations in which more than one set of opcodes can be generated for the same instruction. (For example, MOV AX,BX can be generated using either an 89 or 8B opcode, by reversing fields in the following ModRM byte. Both forms are absolutely identical in functionality and execution speed.) A86 adopts an unusual mix of choices in such situations. This creates a code-generation "footprint" that occupies no space in your program file, but will enable me to tell, and to demonstrate in a court of law, if a non-trivial object file has been produced by A86. The specification for this "footprint" is sufficiently obscure and complicated that it would be impossible to duplicate by accident. I claim exclusive rights to the particular "footprint" I have chosen, and prohibit anyone from duplicating it. This has at least two specific implications: a. Any assembler that duplicates the "footprint" is mine. If it is not identified as mine and issued under these terms, then those who sell or distribute the assembler will be subject to prosecution. b. Any program marked with the "footprint" has been produced by my assembler. It is subject to condition 5 above. Registration Benefits Thank you for enduring the legalities. They are there to protect me, and also to convince you that this is my business, from which I expect to make a living. I'll now return to a softer sell, to try to make you want to register for my products. There is a certain amount of ambiguity about when you're still evaluating A86, and when you're really using A86 and should register for it. Some cases are clear (e.g., you're a school using A86 to teach a course); but many are not. In practical reality, it up to you to decide: you are "on your honor". Also in practical reality, most users who ought to register haven't, yet. For most, it's not dishonesty but merely procrastination. So I have provided some incentives, to prod you into registering. One incentive is the printed manual, which only registered users can purchase. I haven't left anything out of the disk version of the manual, but the printed version is formatted and bound much more nicely than if you print it yourself. Another incentive is the tool A86LIB.COM, that lets you create libraries of source files, to be automatically searched by A86 whenever your program has undefined symbols. This means you can effectively add procedures of arbitrary power and complexity to A86's language.

1-4 Also, when you register you're on my mailing list. I'll occasionally send you notices about what I've added to A86 and D86 since the last notice. When I bring out new products, you'll hear about them. (I'm working on a library of source files for A86, and also a 386 assembler-debugger package.) Finally, there are the intangible incentives. You know you've done the right thing. You're letting me know that you appreciate what I've done. You're letting the world know that quality software can succeed when distributed as shareware. Overview of A86 A86 accepts assembly language source files, and transforms them directly into either: (1) .COM files executable under MS-DOS, starting at offset 0100 within a code segment; (2) .OBJ files suitable for feeding to a linker; or (3) object files starting at offset 0, suitable for copying to ROMs. A86 is a full featured, professional quality program. I designed A86 to be as closely compatible to the standard Intel/IBM assembly language as possible, given that I insisted upon making design and language enhancements necessary to make A86 the best possible assembler. Some of A86's most notable features are: * A86 is blazingly fast-- 4 times as fast as MASM V5.1. In the best conditions (large program, 8MHz AT, RAM drive) A86 assembles at a rate of over a thousand lines per second. That's per second. NOT per minute, per second. * A86 is simple to use. You can feed it a program containing just machine instructions, without the red tape (NAME, ASSUME, SEGMENT PARA PUBLIC, PROC, ENDP, END, PUBLIC, EXTRN, etc. etc.) necessary with other assemblers. The output of A86 can be a .COM file, ready to execute immediately. You don't have to go through a linker. Or, if you want to go through a linker, A86 will produce a correct .OBJ file even if no red tape directives are given-- the default settings are compatible with most high-level languages. (If you have programs written for that other assembler containing the red tape directives, you may leave them in: A86 knows about them, and is programmed to act upon them when assembling .OBJ files, and ignore them if assembling .COM files.) * In spite of its simplicity, A86 encourages modular programming, even in its .COM mode, with separately-developed source files. This is because A86 assembles multiple source files in its invocation line; and because A86 assembles source files faster than other people's linkers can link their object files. You get all the advantages of relocation/linkage systems (building up libraries of reliable program modules that you can piece together), without the disadvantages (excessive, time-and-source-code-wasting, confusing red tape).

1-5 * A86 has ample capacity for really large programming projects. Its symbol table capacity is approximately 1500 10-letter symbols, plus room for 8K bytes of compressed macro definition text. (10 letters is an average symbol length; A86 recognizes up to 127 letters in a symbol.) Plus, A86's generic local label facility effectively doubles your symbol table capacity. * A86 has language extension features that, once you start using, you'll never want to do without. These include multiple operands to PUSH and POP; conditional returns; MOV from one segment register to another; assembly time assertion checking; based structures; and IF (flag) (statement). * A86's macro processor is the best, achieving an optimal balance between ease of use and raw power. Its looping and text concatenation abilities let you define sophisticated macros, whose calls look just like the machine instructions that surround them; without the clumsy invocation syntax required by other macro processors of A86's power. * A86 provides clear, English error messages, given right at the point in the source code where A86 detected the error. The messages are actually inserted into your source file, where you can read them and correct your code at the same time. You can remove the messages yourself, or A86 will remove them for you when it reassembles the file. (Fear not: your original source is preserved in x.OLD if you want it. Or you can disable this feature and send error messages to a .ERR file.) * A86 provides a full complement of assembly time expression arithmetic operators, compatible with Intel/IBM assemblers. A86 also provides 4-function floating point arithmetic in assembly time expressions used for floating point initializations (an A86-exclusive feature). * A86 assembles the floating point instruction set of the 8087/287/387/IIT coprocessors, and the extended instruction set of the 186/286/NEC series, including the NEC-unique instructions. * A86 has a built-in source file library feature. Any undefined symbols in your program are automatically searched for in a special library file A86.LIB, and the associated source files are automatically assembled. This makes access to library routines as effortless as it is in the "C" programming language. A sample A86.LIB file is included in the shareware version of the package. Only registered users should have the tool A86LIB, with which you can create your own library files. * A86 works with an associated symbolic debugger, D86, to make the finest development environment available for the PC. See the D86 package for the details of its features.

1-6 About the Author I am a full-time shareware author. I have worked with Intel microprocessors since the early days of the 8080. As an employee of Intel, I was a part of the two-man team that implemented the first ASM86 assembler. Having worked with all the processors of the 86 family from the beginning, I know as much as anyone about their machine-language architecture. I have written a book, The 80386/387 Architecture, by Morse, Isaacson, and Albert, published by Wiley and Sons, ISBN 0-471-85352-6. Look for it in your bookstore (or I'll send you a copy for $20, which is $4.95 off the list price.) A86 and D86 themselves are extremely mature, solid programs. They have been in existence since 1984, running first under my own, proprietary operating system; then later under the Xenix operating system on Altos computers, used by myself and my clients. I have been making a decent living from A86 and D86 for some time now, and with your much-appreciated support, I will continue to improve my products, and enhance them with new, related offerings. How to Contact Me I have no plans to move from my present location at least through the millennium. So you can write to: Eric Isaacson Software 416 East University Ave. Bloomington, IN 47401-4739 or call (812)339-1811. Sorry, I can't guarantee to return everybody's long distance calls. If you'd like to be SURE I'll get back to you, please invite me to call you back collect, or tell me to charge the cost of the call to your credit card. I also accept BBS mail at PC-Link Central, (812)855-7252, which I try to check into daily. Type J 3 when you get on that system, to reach my conference. Another BBS which I check into about twice a week is Indiana On-Line, at (812)332-7227-- type J A86 to reach my conference on that BBS. I also check into Compuserve every 10 days or so-- my ID number there is 71520,74. PLEASE contact me if you find bugs in my programs; I'll fix them! I accept bug reports from anyone, registered or non-registered, no questions asked. It's very frustrating to hear about people telling each other about bugs, and not telling me. I still await Greg Wettstein's bug list.