Welcome

Assembly and Linking Example

  This section describes the assembly and linking of a moderately
complex program.  (The project is a multi-channel high voltage
control system for the stabilization of nuclear radiation detection
equipment.)

    -... Assembly
    -... Linking

    -... Go to Documentation Index

-... Assembly

  The project files included eleven .ASM modules and
four .DEF include files:

        PHS.ASM                 SYSTEM.DEF
        ACIA.ASM                AREA.DEF
        ACQ.ASM                 DEFINE.DEF
        HVCTRL.ASM              DATA.DEF
        TERMIO.ASM
        SELECT.ASM
        STATUS.ASM
        HISTOS.ASM
        HELP.ASM
        AICONV.ASM
        PHSMON.ASM

  Each of the modules was assembled individually.  This was done
by creating a command file containing the assembly command lines:

        as6809 -gloaxzsff phs
        as6809 -gloaxzsff acia
        as6809 -gloaxzsff acq
        as6809 -gloaxzsff hvctrl
        as6809 -gloaxzsff termio
        as6809 -gloaxzsff select
        as6809 -gloaxzsff status
        as6809 -gloaxzsff histos
        as6809 -gloaxzsff help
        as6809 -gloaxzsff aiconv
        as6809 -gloaxzsff phsmon

The assembly process produced an object (.REL) file (-s), a listing
(.LST) file (-l), and a symbol (.SYM) file (-s) for each individual
.ASM file.  The assembly process made all undefined labels
global (-g), all internal labels global (-a), the output in HEX
format (-x), and the listing files to have relocations flagged (-ff).
This project required the case sensitive option, -z.

=> Section Index

-... Linking

  The program was linked using a file (PHS.LNK) containing the following
command lines:

        -mxsuz
        phs
        acia
        acq
        hvctrl
        termio
        select
        status
        histos
        help
        aiconv
        phsmon
        -b WORKPG = 0x0F00
        -b BUFSAV = bufsav
        -b PGMSAV = pgmsav
        -b IRQVEC = irqvec
        -e

and was invoked by the command line:

        aslink -f phs

The linking process produced a map (.MAP) file (-m) in HEX format (-x)
and a Motorola (.S19) loader file (-s).  The -b options specify the
memory addresses for certain program sections as defined in the
assembled modules.  The file input was terminated by the -e option.

=> Section Index

... Exit the ASxxxx Documentation

... Home Page