## ASxxxx Utility Programs

### ... The ASxxxx Utilities

####

- Diagnostic Listing File Scanner
- Diagnostic Assembler File Creator
- ASxxxx Diagnostic Assembler
- Go to the Documentation Index

####

    The ASXSCN Listing File Scanner

       The  program  ASXSCN  is  a debugging utility program used to
    verify ASxxxx assembler code generation.  The program may be in-
    voked with any of the following options:

            Usage: [-dqx234i] file
              d    decimal listing
              q    octal   listing
              x    hex     listing (default)
              2    16-Bit  address (default)
              3    24-Bit  address
              4    32-Bit  address
              i    ignore relocation flags

       Select  one of the -d, -q, or -x options to match the listing
    file format and select only one of the -2, -3, or -4 options  to
    match  the  addressing range of the listing file.  The -i option
    inhibits the verification  of  the  assembler  relocation  flags
    generated by the ASxxxx assemblers -f or -ff options.

       Each  source assembly line selected for verification must in-
    clude the expected output code in the comment field of the line.
    The  following  has  been  extracted  from the ASF2MC8 test file
    tf2mc8.asm:

            reti            ; 30
            call  ext       ; 31s12r34
            subc  a         ; 32
            subcw a         ; 33
            subc  a,#v22    ; 34r22
            subc  a,*dir    ; 35*33
            subc  a,@ix+off ; 36r44
            subc  a,@ep     ; 37

    The  r,  s,  and * are specific address relocation flags created
    when the -ff option is specified with any ASxxxx assembler.

       Invoking the assembler:

            asf2mc8 -gloaxff tf2mc8

    produces a listing file:

    033B 30          677    reti            ; 30
    033C 31s12r34    678    call  ext       ; 31s12r34
    033F 32          679    subc  a         ; 32
    0340 33          680    subcw a         ; 33
    0341 34r22       681    subc  a,#v22    ; 34r22
    0343 35*33       682    subc  a,*dir    ; 35*33
    0345 36r44       683    subc  a,@ix+off ; 36r44
    0347 37          684    subc  a,@ep     ; 37

       The  expected code can be compared with the generated code by
    invoking the scanning program:

            asxscn tf2mc8.lst
            0 code error(s) found in file tf2mc8.lst

    The assembled code can also be linked:

            aslink -u ...options... t2fc8

    to create an updated listing file:

    033B 30          677    reti            ; 30
    033C 31 12 34    678    call  ext       ; 31s12r34
    033F 32          679    subc  a         ; 32
    0340 33          680    subcw a         ; 33
    0341 34 22       681    subc  a,#v22    ; 34r22
    0343 35 33       682    subc  a,*dir    ; 35*33
    0345 36 44       683    subc  a,@ix+off ; 36r44

    which resolves all relocations and removes the relocation flags.
    This file can also be verified:

            asxscn -i tf2mc8.rst
            0 code error(s) found in file tf2mc8.rst

       The  verification  of  both  the .lst and .rst files from the
    same assembler test file requires careful definition of external
    variables  so  that  the  assembler  listing file and the linker
    listing file have the same code values.

##### => Section Index

####

    The ASXCNV Diagnostic Assembler File Creator

       The  program  ASXCNV  is  a debugging utility program used to
    create an assembler file with verification  data.   The  program
    may be invoked with any of the following options:

            Usage: [-dqx234] file
              d    decimal listing
              q    octal   listing
              x    hex     listing (default)
              2    16-Bit  address (default)
              3    24-Bit  address
              4    32-Bit  address

       Select  one of the -d, -q, or -x options to match the listing
    file format and select only one of the -2, -3, or -4 options  to
    match the addressing range of the listing file.

       Each source assembly line which creates output data will have
    the data appended to the source line as a comment.  The appended
    comment will contain the relocation codes if they are present in
    the listing file.  Any existing comment  on  the  line  will  be
    overwritten.

       Given an existing listing file, a.lst, containing:

    033B 30          677    reti
    033C 31s12r34    678    call  ext
    033F 32          679    subc  a
    0340 33          680    subcw a
    0341 34r22       681    subc  a,#v22
    0343 35*33       682    subc  a,*dir
    0345 36r44       683    subc  a,@ix+off
    0347 37          684    subc  a,@ep

    A  converted  listing  file  can  be created using the following
    command:

            asxcnv -d2 a.lst

    The  created output file, a.out, is a new assembly file now con-
    tain the verification data in the comments:

            reti            ; 30
            call  ext       ; 31s12r34
            subc  a         ; 32
            subcw a         ; 33
            subc  a,#v22    ; 34r22
            subc  a,*dir    ; 35*33
            subc  a,@ix+off ; 36r44
            subc  a,@ep     ; 37

##### => Section Index

####

    ASCHECK Diagnostic Assembler Program

       The  ASxxxx assembler ASCHECK is used to test the machine in-
    dependent features of the ASxxxx assemblers.  The  source  files
    for  the ASCHECK assembler are also useful as a template for the
    development of a new ASxxxx assembler.

       The  ASCHECK  assembler has all the ASxxxx directives enabled
    for testing all features of the assemblers.

    .opcode DIRECTIVE

    Format:

            .opcode    n

    The  .opcode  directive creates a single byte of code having the
    value n and having cycle counts defined in the following table:

    /*--*--* 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */
    /*--*--* -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - */
    /*00*/   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,
    /*10*/  UN, 1,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,
    /*20*/  UN,UN, 2,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,
    /*30*/  UN,UN,UN, 3,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,
    /*40*/  UN,UN,UN,UN, 4,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,
    /*50*/  UN,UN,UN,UN,UN, 5,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,
    /*60*/  UN,UN,UN,UN,UN,UN, 6,UN,UN,UN,UN,UN,UN,UN,UN,UN,
    /*70*/  UN,UN,UN,UN,UN,UN,UN, 7,UN,UN,UN,UN,UN,UN,UN,UN,
    /*80*/  UN,UN,UN,UN,UN,UN,UN,UN, 8,UN,UN,UN,UN,UN,UN,UN,
    /*90*/  UN,UN,UN,UN,UN,UN,UN,UN,UN, 9,UN,UN,UN,UN,UN,UN,
    /*A0*/  UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,10,UN,UN,UN,UN,UN,
    /*B0*/  UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,11,UN,UN,UN,UN,
    /*C0*/  UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,12,UN,UN,UN,
    /*D0*/  UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,13,UN,UN,
    /*E0*/  UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,14,UN,
    /*F0*/  UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,UN,15

    The  UN symbols indicate 'undefined cycles' where no cycle count
    will be output.

##### => Section Index

####

... Exit the ASxxxx Documentation

... Home Page

######

Last Updated: January 2006