|Table Of Contents||Previous||Next|
The three plus signs are FLEX's ready prompt, ASMB is the name of the assembler file (it has a .CMD extension), and the <filename> is the standard FLEX specification for the source file you wish to assemble. The <filename> 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)?
to which you may respond 'Y' which will delete the existing file and continue to create the new file or 'N' which will immediately terminate the assembly, returning to FLEX with the old binary file remaining intact.
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,<input file spec>,<binary file spec>
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.
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,<input file spec>[,<binary file spec>][,+<option list>]
The square brackets indicate that the binary file spec and the option list are optional. The plus sign is required to separate the option list from the file specifications. The <option list> is a set of single character flags which either enable or disable a particular option. In all cases they reverse the sense of the particular option from its default sense. There may be any number of options specified and they may be specified in any order. There may not be spaces within the option list. Following is a list of the available options and what they represent:
|B||Do not create a binary file on the disk. No binary file will be created even if a binary file name is specified. This is useful when assembling a program to check for errors before the final program is completed or when obtaining a printed source listing.|
|L||Suppress the assembled listing output. If not specified, the assembler will output each line as it is assembled in pass 2, Those lines containing errors will always be printed regardless of whether or not this option is specified.|
|S||Suppress the symbol table output. The assembler normally prints out a sorted symbol table at the end of an assembly. This option suppresses that output. Note that the L option will not suppress the symbol table output, just the source itself.|
|G||Turns off printing of multiple line object code instructions. Certain directives (FCB, FDB, and FCC) can produce several lines of output listing for only one instruction line. This option prints the first line of output from such an instruction (the line which contains the source) but suppresses the printing of the subsequent lines which contain only object code information.|
|N||Enables the printing of decimal line numbers on each output line. These numbers are the consecutive number of the line as read by the assembler. Error lines are always output with the line number regardless of the start of this option.|
|T||Produce a hex output directly to tape. This output is formatted in the standard Motorola 'S1-S9' format. Consult the section on object code production for further details.|
|Y||This option overrides the prompt for deleting an existing binary file. In other words, if the Y option (stands for YES) is specified, an existing binary file of the same name as the one to be created will be automatically deleted without a prompt.|
|D||Suppress printing of the date in the header at the top of each output page. The assembler normally picks up the current date from FLEX and prints it in the header. This option causes the date to be omitted.|
|W||Suppress warning messages. The 6809 assembler is capable of reporting a number of warning messages as well as an indicator of long jumps and branches that could be shortened. This option suppresses the printing of these messages and indicators.|
|P<no>||This option allows the programmer to specify a page number at which to start printing of the assembled listing. Complete instructions can be found in the next paragraph.|
+++ASMB,<in file>,<binary file>,+<options>,+<prm.l>,<prm.2>,<prm.3>
The parameters are optional but must be separated from the rest of the line by the second plus sign and from each other by commas. As stated, these parameters are simply strings of characters. They may be supplied in two ways: as a string of characters enclosed by a delimiter or just a string of characters with no spaces or commas embedded. The "delimiters" which can be used to enclose a string are the single quote (') and the double quote ("). Either can be used but for a particular string the beginning delimiter and the ending delimiter must be the same. The reason for using a delimited string is to pass in a string with commas and/or spaces which cannot be in an un-delimited string. Note that if one wishes to enter a command line parameter but no options, he must still place both plus signs in the command as seen in this example command line:
For further information on command line parameters and how to specify where in the source program these parameters should be substituted, see the section on Special Features.
would cause the assembled listing of the source file TESTFILE.TXT to be output to the printer. For further details of use of the 'P' command the FLEX User's Manual and Advanced Programmer's Guide.
Same as before except that no listing is output (except for any lines with errors) and no symbol table is output.
Assembles a file from drive 0 called TEST.TXT and produces a binary file on drive 1 called TEST.CMD. No listing or symbol table is output and if a file by the name of TEST.CMD already resides on drive 1, it will be automatically deleted before the assembly starts.
Loads the assembler itself from drive 1 and assembles a file called TEST.BAK found on drive 0. No binary file is produced. The assembled listing is output with line numbers turned on and multiple line generated code turned off. No symbol table is printed.
This command performs just like the last with two exceptions. First, the assembler itself is loaded from the whatever the assigned system drive is. Second, the assembled listing output does not begin until the assembler reaches page number 26.
0.ASMB,0.ASMB,0.ASMB,+GW,+MINI,'ASSEMBLER FOR 5" DISK'
This command looks a little confusing, but it was done to accentuate the method in which default extensions work. The assembler itself (a file called ASMB.CMD) is loaded from drive 0, the file called ASMB.TXT found on drive 0 is assembled, and a binary file is produced on drive 0 by the name ASMB.BIN. Note that it was not necessary to specify the binary file name in this case since ASMB.BIN is what the default would have been. The assembled listing is output with multiple line code generation suppressed and warning messages suppressed. There are two parameters which may be passed into the source listing. The first is the single word 'MINI'. The second parameter is the entire string, 'ASSEMBLER FOR 5" DISK', excluding the single quote delimiters (everything starting with the A and ending with the K).
|Table Of Contents||Previous||Next|