Command Line Interface

MPASM Assembler

Command Line Interface

MPASM assembler can be invoked through the command line interface (command prompt) as follows:

mpasmwin [/<Option>[ /<Option>...]] [<filename>]

or

mpasm [/<Option>[ /<Option>...]] [<filename>]

where

/<Option> - refers to one of the command line options

<filename> - is the file being assembled

For example, if test.asm exists in the current directory, it can be assembled with following command:

mpasmwin /e /l test

The assembler defaults (noted below) can be overridden with options:

Option
Result
/<option>
Enables the option
/<option>+
Enables the option
/<option>-
Disables the option
/<option><filename>
If appropriate, enables the option and directs the output to the specified file

If the source filename is omitted, the appropriate shell interface is invoked, i.e.,

  • mpasmwin - a Windows interface is displayed, which includes a Help button
  • mpasm - the assembler help panel is displayed (same as mpasm /?)
  • Option
    Default
    Description
    ?
    N/A
    Displays the assembler help panel (mpasm.exe).
    a
    INHX8M
    Generate absolute .cod and .hex output directly from assembler; /a<hex-format>, where <hex-format> is one of [INHX8M | INHX8S | INHX32].
    c
    On
    Enables/Disables case sensitivity.
    d
    N/A
    Define a text string substitution; /d<label>[=<value>].
    e
    On
    Enable/Disable/Set Path for error file.
    /e Enable
    /e+ Enable
    /e- Disable
    /e <path>error.file Enables/sets path
    h
    N/A
    Displays the assembler help panel.
    l
    On
    Enable/Disable/Set Path for list file
    /l Enable
    /l+ Enable
    /l- Disable
    /l <path>list.file Enables/sets path
    m
    On
    Enable/Disable macro expansion.
    o
    Off
    Enable/Disable/Set Path for object file.
    /o Enable
    /o+ Enable
    /o- Disable
    /o <path>object.file Enables/sets path
    p
    None
    Set the processor type; /p<processor_type>, where <processor_type> is a PICmicro MCU device, e.g., PIC16C54.
    q
    Off
    Enable/Disable quiet mode (suppress screen output).
    r
    Hex
    Defines default radix; /r<radix>, where <radix> is one of [ HEX | DEC | OCT ].
    t
    8
    List file tab size; /t<size>.
    w
    0
    Set message level; /w<value>, where <value> is one of [0|1|2].
    0 all messages
    1 errors and warnings
    2 errors only
    x
    Off
    Enable/Disable/Set Path for cross reference file.
    /x Enable
    /x+ Enable
    /x- Disable
    /x <path>xref.file Enables/sets path
    y
    Disabled
    Enable/Disable extended instruction set.
    /y Enable
    /y+ Enable
    /y- Disable
    Can only be enabled for processors which support the extended instruction set and the generic processor PIC18CXX. /y- overrides LIST PE=<type> directive. (Specify processor type and enable extended instruction set.)


    Microchip Technology Inc.
    Microchip's Web Site
    Voice: (480) 792-7200
    Fax: (480) 899-9210
    Microchip's E-mail Address
    PreviousNext