(Commentaire sous forme de note FLEX User Group 11/11/1997 18:04:36 This document has been created on behalf of the FLEX User Group to keep FLEX Alive. Many thanks to the copyright holder of this manual for releasing the copyright to the Flex User Group.) FLEX Assembler Technical Systems Consultants, Inc. COPYRIGHT (c) 1979 by Technical Systems Consultants, Inc. P.O. Box 2570 West Lafayette, Indiana 47906 All Rights Reserved Table of Contents Table of Contents I. Introduction 1 II. Getting the System Started 2 III. Assembler Operation 7 IV. The Instruction Set 13 V. Standard Directives 25 VI. Conditional Assembly 33 VII. Macros 37 VIII. Special Features 46 IX. Object Code Production 52 X. Error and Warning Messages 53 XI. Adapting to Your System 55 TSC 6809 Assembler TSC 6809 Assembler TSC 6809 Assembler The 6809 Mnemonic Assembler is a fast and powerful disk based assembler interfaced to the FLEXt disk operating system. It accepts all standard Motorola mnemonics for the 6809 instruction set as well as all standard 6800 and 6801 mnemonics. Macros and conditional assembly are supported as well as numerous other directives for convenient assembler control. The assembler executes in two passes and can accept any size file on the disk so long as sufficient memory is installed to contain the symbol table. Output is in the form of a binary disk file or a hexadecimal tape as well as an assembled listing output which may be routed to a printer or to a disk file through the facilities of FLEX. This manual is by no means intended to teach the reader assembly language programming nor even the full details of the 6809 instruction set. It assumes the user has a working knowledge of assembly language programming and a manual describing the 6809 instruction set and addressing modes in full. The former can be acquired through any of a large number of books available on assembly programming, the latter from the 6809 hardware manufacturer or seller. Throughout the manual a couple of notational conventions are used which are explained here. The first is the use of angle brackets (’<’ and ’>’). These are often used to enclose the description of a particular item. This item might be anything from a filename to a macro parameter. It is enclosed in angle brackets to show that it is a single item even though the description may require several words. The second notation is the use of square brackets (’[’ and ’]’). These are used to enclose an optional item. FLEX is a trademark of Technical Systems Consultants, Inc. - 1 TSC 6809 Assembler TSC 6809 Assembler GETTING THE SYSTEM STARTED The disk version of the 6809 Mnemonic Asssembler is very simple to use. There are no built-in editing functions - you must have a previously edited source file on disk before using the assembler. This file must be a standard FLEX text file which is simply textual lines terminated by a carriage return. There should be no line numbers or control characters (except for the carriage returns) in the file. When you have both the assembler and the edited source file on a disk or disks which are inserted in a powered up system, you are ready to begin. The Command Line The very minimum command line necessary to execute an assembly is as follows: +++ASMB, The three plus signs are FLEX’s ready prompt, ASMB is the name of the assembler file (it has a .CMD extension), and the is the standard FLEX specification for the source file you wish to assemble. The defaults to a .TXT extension and to the assigned working drive if an explicit extension and drive number are not given. In this and forthcoming example command lines, a comma is used to separate items. It is also possible to use a space or spaces in this capacity. As stated, this is the very minimum command which can be used. It is possible to supply many more parameters or options to the assembler, but if left off as in this example, the assembler will assume default parameters. Perhaps the most important options available are the two associated with output. We say two because there are two types of output available from the assembler: object code output and assembled source listing output. The options regarding the assembled source listing output will be described a little later. The object code can be in the form of a binary disk file, a hex output to tape, or no object code output at all. Since no specifications are made concerning object code output in the above example, the assembler will assume the default case which is a binary disk file. Since no name was specified, the output binary file will assume the same name as the input source file specified but with a .BIN extension. If such a file already exists, you will be asked: DELETE OLD BINARY (Y-N)? - 2 TSC 6809 Assembler TSC 6809 Assembler If you wish to create a binary file by another name or extension, you may do so by placing the desired file specification on the command line as follows: +++ASMB,, This binary file specification will default to a .BIN extension and to the assigned working drive. If a file by that name already exists on the specified drive, you will be prompted as described above. Specifying Assembly Options Now we shall go one step further and add a set of single character option flags which may be set on the command line as follows: +++ASMB,[,][,+