CHAPTER 1 INTRODUCTION AND LEGAL TERMS 1-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 this entire package, and give it 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. 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 $40 US to: Eric Isaacson 416 E. University Street Bloomington, IN 47401 For your convenience, I now accept Visa and MasterCard, by telephone. My number is (812)339-1811. Registered users may order update-diskettes (5.25 inch, double density) for $10 US, or $12 US if you are overseas. (In other words, send $50, $52 if overseas, if you want to register and get an update-diskette.) Once you register for this package, you are entitled to a life-time of updates of this package, at $10 or $12 each, as long as I am in business and willing to cash your checks. (Well, let's make that 1987-dollars. If rampant inflation sets in, I reserve the right to raise prices accordingly.) Indiana residents add sales tax. I have a combination offer for the A86 and D86 packages. Instead of $40 + $40 = $80, I charge $70 for both; $80 for both with an update. You need to get an update disk to get the tool A86LIB available only to registered users. So almost all of you should send $50 for A86, $80 for both A86 and D86. 1-2 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. You may not sell this package to anyone. If you distribute this package on a diskette, any fees you collect must be specified as materials/handling, and may not exceed $10 for the diskette. 4. You are 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. You must be a registered user to 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). 6. This assembler uses a code-generation "footprint" that will enable me to tell, and to demonstrate in a court of law, if a non-trivial object file has been produced by my assembler. 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. *** NOTE: If you have the impression that the "footprint" adds bytes to your program file, you are wrong. You retain complete control over the object code generated. A86 takes advantage of situations in which more than one set of object codes can be generated for a given instruction: the "footprint" consists of a complicated mix of choices in such situations. 1-3 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 world's finest assembler. Some of A86's most notable features are: * A86 is blazingly fast. Don't believe the advertisements of that other, big company. THIS is the fastest MSDOS macro assembler, bar none. In the best conditions (large program, 8MHz AT, hard or RAM drive, contiguous files) 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). * 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). 1-4 * 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, and the extended instruction set of the 186/286/NEC series. This now includes the NEC-unique instructions, which I had been unaware of until somebody pointed them out to me. * 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 this package for your evaluation, but you'll have to register to obtain 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, available now, for the details of its wonderful features. Who IS That Guy? For those of you who wish to know what credentials I have for producing programs that meet the above claims, let me tell you who I am. I am an independent software consultant. 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. I am one of the world's leading authorities on the entire 86-family of microcomputers, having completed numerous major projects involving the 8086, and 80186, and the 80286. I just completed a book on the 386/387 architecture, to be published in late July by Wiley and Sons. 1-5 A86 and D86 themselves are mature, solid programs. They have been in existence for 3 years, running first under my own, proprietary operating system; then later under the Xenix operating system on Altos computers, used by myself and my clients. Although I have been unknown to the world of the IBM-PC until A86, I intend to change all that in the next couple of years. Peter Norton, watch out. Support Your Local Bulletin Board Bob Breedlove, a BBS Sysop in California, sent me a suggestion with his registration: that I do something to support Sysops, since they are distributing my software for me. Good point, Bob. Let me try this experiment (but I reserve the legal right to cancel this offer at any time, without notice): if anybody who registers wishes to support the BBS from which they obtained my program, they should tell me the name and phone number of the BBS when they register. They should also leave a message to the Sysop that they have done so, so the Sysop can contact me with his/her address. If I receive 5 registrations naming a particular BBS, I'll award a free registration to the Sysop-- the Sysop can designate who the registration is for; or (if the Sysop has already paid for a registration) he/she can elect to receive a cash refund. For each subsequent 5 registrations, I'll send the Sysop a cash rebate equal to one half the registration fee. Sorry, no bonuses for less than 5 registrations; I don't want to be swamped with paperwork. How to Get in Touch With Me For earlier versions of A86, I didn't give out my telephone number, because I was afraid that all my time would be chewed up giving telephone support. But then I attended a convention of shareware programmers, in which the Big Boys (Wallace, Button, Magee, etc.) unanimously agreed that a product needs telephone support to be successful. I'm still not completely convinced for my case; assembly langauge is so complicated that it would be pretty easy to abuse support privileges. But almost everybody who has called directory assistance and then phoned me anyway has provided me with useful inputs with their problems. Also, now that I accept credit cards, there's a financial interest in giving people increased access to me. So I'll field questions from REGISTERED users (and you can register on the spot, with a credit card). As one of the Big Boys says, I reserve the right to withhold support of you are obnoxious about it. 1-6 So now your choices for contacting me are: 1. Phone me by voice at (812)339-1811. Have your credit card ready if you haven't registered yet. If you get an answering machine, give your card number, expiration date, name as it appears on the card, address, city, state, zip, phone number with area code, which product or products your are registering for, and the amount. If you would like me to return your long- distance call, specify whether you want me to call collect, or to add the charges to your credit card. 2. Write to me. Please enclose a stamped-self-addressed envelope if you want a reply. 3. Leave me bulletin-board mail, on the Bloomington PC-Link Central bulletin board, at (812)335-7252; or Indiana On-Line, at (812)332-7227. I'll reply on the same board. PLEASE contact me if you find bugs in my programs; I'll fix them! It's very frustrating to hear about people telling each other about bugs, and not telling me. I still await your bug list, Greg Wettstein.