Welcome

The Assembler Description

-... Invoking ASxxxx

   The  ASxxxx  assemblers are command line oriented.  After the
assembler is started, enter the option(s) and file(s) to  assem-
ble following the 'argv:' prompt:  

argv:  [-dqxgalosf] file1 [file2 file3 ...  file6] 

The options are:  

        d       decimal listing
        q       octal   listing
        x       hex     listing (default)

                The listing radix affects the
                .lst, .rel, and .sym files.

        g       undefined symbols made global
        a       all user symbols made global

        l       create list   output file1.lst
        o       create object output file1.rel
        s       create symbol output file1.sym

        p       disable listing pagination

                relocatable reference flagging:

        f       by  `   in the listing file
        ff      by mode in the listing file

   The file name for the .lst, .rel, and .sym files is the first
file name specified in the command line.  All output  files  are
ascii  text  files which may be edited, copied, etc.  The output
files are the concatenation of all the input files, if files are
to  be  assembled  independently  invoke  the assembler for each
file.  

   The  .rel  file contains a radix directive so that the linker
will use the proper conversion for this file.  Linked files  may
have different radices.  

   If  the list (l) option is specified without the symbol table
(s) option, the symbol table is placed at the end of the listing
file.  

Return to the Assembler Index

-... Errors

   The  ASxxxx assemblers provide limited diagnostic error codes
during the assembly process, these errors will be noted  in  the
listing file and printed on the stderr device.  

   The assembler reports the errors on the stderr device as 

        ?ASxxxx-Error-<*> in line nnn of filename

where  * is the error code, nnn is the line number, and filename
is the source/include file.  

   The errors are:  

      (.)   This  error  is caused by an absolute direct assign-
            ment of the current location counter 
                  . = expression (incorrect) 
            rather than the correct 
                  . = . + expression 

      (a)   Indicates  a machine specific addressing or address-
            ing mode error.  

      (b)   Indicates a direct page boundary error.  

      (d)   Indicates a direct page addressing error.  

      (i)   Caused  by  an  .include file error or an .if/.endif
            mismatch.  

      (m)   Multiple  definitions  of  the  same label, multiple
            .module directives, or multiple  conflicting  attri-
            butes in an .area directive.  

      (o)   Directive  or  mnemonic error or the use of the .org
            directive in a relocatable area.  

      (p)   Phase error:  label location changing between passes
            2 and 3.  Normally caused by having  more  than  one
            level of forward referencing.  

      (q)   Questionable syntax:  missing or improper operators,
            terminators, or delimiters.  

      (r)   Relocation  error:   logic  operation attempted on a
            relocatable term, addition of two relocatable terms,
            subtraction  of two relocatable terms not within the
            same programming area or external symbols.  

      (u)   Undefined symbol encountered during assembly.  

Return to the Assembler Index

-... Listing File

   The  (-l) option produces an ascii output listing file.  Each
page of output contains a four line header:  


     1.  The ASxxxx program name and page number 

     2.  Title from a .title directive (if any) 

     3.  Subtitle from a .sbttl directive (if any) 

     4.  Blank line 



Each succeeding line contains five fields:  


     1.  Error field (first three characters of line) 

     2.  Current location counter 

     3.  Generated code in byte format 

     4.  Source text line number 

     5.  Source text 


   The error field may contain upto 2 error flags indicating any
errors encountered while assembling this line of source code.  

   The  current  location counter field displays the 16-bit pro-
gram position.  This field will be in the selected radix.  

   The generated code follows the program location.  The listing
radix determines the number of bytes that will be  displayed  in
this field.  Hexidecimal listing allows six bytes of data within
the field, decimal and octal allow four bytes within the  field.
If more than one field of data is generated from the assembly of
a single line of source code, then the data field is repeated on
successive lines.  

   The source text line number is printed in decimal and is fol-
lowed by the source text.  

   Two  special  cases  will  disable  the  listing of a line of
source text:  

     1.  Source line with a .page directive is never listed.  

     2.  Source  line  with  a  .include  file  directive is not
         listed unless the .include file cannot be opened.  


   Two  data  field  options  are  available to flag those bytes
which will be relocated by the linker.   If  the  -f  option  is
specified  then  each  byte to be relocated will be preceeded by
the '`' character.  If the -ff option  is  specified  then  each
byte  to  be relocated will be preceeded by one of the following
characters:  

     1.  *   paged relocation 

     2.  u   low  byte of unsigned word or unsigned byte 

     3.  v   high byte of unsigned word 

     4.  p   PCR low  byte of word relocation or PCR byte 

     5.  q   PCR high byte of word relocation 

     6.  r   low  byte relocation or byte relocation 

     7.  s   high byte relocation 

Return to the Assembler Index

-... Symbol Table File

   The symbol table has two parts:  

     1.  The alphabetically sorted list of symbols and/or labels
         defined or referenced in the source program.  

     2.  A  list of the program areas defined during assembly of
         the source program.  


   The sorted list of symbols and/or labels contains the follow-
ing information:  

     1.  Program  area  number (none if absolute value or exter-
         nal) 

     2.  The symbol or label 

     3.  Directly assigned symbol is denoted with an (=) sign 

     4.  The  value of a symbol, location of a label relative to
         the program area base address (=0), or a ****  indicat-
         ing the symbol or label is undefined.  

     5.  The  characters:   G - global, R - relocatable, and X -
         external.  


   The list of program areas provides the correspondence between
the program area numbers and the defined program areas, the size
of the program areas, and the area flags (attributes).  

Return to the Assembler Index

-... Object File

   The  object  file is an ascii file containing the information
needed by the linker to bind multiple object modules into a com-
plete  loadable  memory  image.   The object module contains the
following designators:  

        [XDQ][HL]
                X       Hexidecimal radix
                D       Decimal radix
                Q       Octal radix

                H       Most significant byte first
                L       Least significant byte first

        H       Header 
        M       Module
        A       Area
        S       Symbol
        T       Object code
        R       Relocation information
        P       Paging information

   Refer to the linker for a detailed description of each of the
designators and the format of the information contained  in  the
object file.  

Return to the Assembler Index

... Exit the ASxxxx Documentation

... Home Page