📄 mpalc.txt
字号:
PIC 16Cxx Assembler
This document describes the technical aspects of the
PIC16Cxx Assembler/Linker (MPALC) developed by Microchip
Technology Incorporated. Included in this manual is a list
of main features, program structure, directives, macro
capabilities, I/O files, and a detailed description of the
instruction sets for the PIC16C5X and PIC16CXX. Based on
the instruction width, 16C5X family processors are sometimes
referred to as 12 bit core machines, and 16CXX processors
are referred to as 14 bit core machines.
The file "MPALC.DOC" on the software tools diskette provides
any updates or additional information which was not
available at the time this User's Guide was printed.
1.1 CONCEPTS
An assembler is a software development tool used to
translate a set of assembler instructions (called source
code) into instructions that are understood by the computer
(called machine code). Assembler instructions are provided
as an easy means by which a programmer can effectively
execute machine instructions.
The complete PIC Assembly language is comprised of the
following three components:
. Instruction mnemonics
. Directives
. Macros
Mnemonics are instructions that are translated directly into
machine code. They are used to perform arithmetic and
logical operations on data residing in either memory or
registers. They also have the ability to move data in and
out of registers and memory as well as conditional branching
to specified program addresses.
Directives provide control of the assembler's operation by
telling the assembler how to treat mnemonics, reference
data, and format the listing and output files. Directives
make coding easier and provide custom output tailored to the
project's needs.
A macro consists of a sequence of assembler commands.
Passing arguments to a macro allows for flexible
functionality of the macro. They provide the following
advantages:
. Higher level of abstraction which in turn improves
readability, simplicity of implementation and greater
reliability.
. Consistent solution to a frequently performed function.
. Simplify changes because changing a macro body is
easier than modifying all locations where a given function
is performed.
1.2 MAIN FEATURES OF MPALC - OVERVIEW
. Translates programs (source code) written in PIC
Assembly language to machine executable code (object code)
on IBM PC or compatibles running MS-DOS V3.31.
. Generates object code in 4 different formats to
accommodate third party EPROM programmers and Microchip's
PIC development tools.
. Accepts source code and generates object code for
Microchip's proprietary PIC microcontroller families
including the PIC16C54, PIC16C55, PIC16C56, PIC16C57,
PIC16C71 and PIC16C84.
. Provides full featured MACRO capability.
. Supports Hex (default), Decimal and Octal source and
listing formats.
. Provides conditional assembly capability.
1.3 ADDITIONAL INFORMATION
Occasionally it may be necessary to distribute additional
information about MPALC after the documentation has been
published. This might include corrections and additions to
the document, examples and applications, or bug reports. If
this information is included, it will be found in the file
"MPALC.DOC" on the software tools diskette.
The appendix to this document entitled "Keeping Current"
contains information about the Microchip Technology systems
bulletin board service. This is another way that you can
maintain the most up-to-date software support tools.
The following is a list of related documents;
. PIC16C5X Data Sheet (DS30015)
. PIC16C71 Data Sheet (DS30150)
. PIC16C84 Data Sheet (DS30081)
This chapter provides instructions on how to install and run
MPALC on your PC. We strongly suggest that this chapter be
read in its entirety before using MPALC. It is a guide to
the initial setup and running of the assembler, and
discusses system dependent features.
2.1 SYSTEM REQUIREMENTS
MPALC will run on any IBM PC/AT or compatible computer,
running MS-DOS v3.31 or greater. The distribution medium is
5 1/4" low density (360k) floppies.
No special display or ancillary devices are required.
2.2 INSTALLATION
MPALC is distributed on a 5 1/4" floppy disk and is at the
root directory level. It may be executed directly from the
floppy by typing:
a:MPALC
for example.
You may want to copy MPALC to your hard disk for
convenience. This can be done by using the DOS "COPY"
command to place it in the desired directory. For example,
you might execute the following at the DOS prompt:
mkdir c:\MPALC
copy a:*.* c:\MPALC\.
You may then include MPALC in your search path by updating
the "PATH" variable in your "AUTOEXEC.BAT" to include this
directory. This allows the programs to be accessed from any
directory on your system.
Please refer to your DOS manual for more information
regarding DOS commands, the "PATH" environment variable and
the "AUTOEXEC.BAT" file. Remember that changes that you
make to this batch file will not take effect until the next
time you boot your machine or execute autoexec.bat.
2.3 INVOKING MPALC
The assembler is invoked with the following command:
MPALC <source_code> [options]
where <source_code> is the file to be assembled and
[options] may be:
[/?]
[/p <processor>]
[/f <object_format>]
[/w <warning level>]
[/w-<error code>
[/r <radix>]
[/t <tab width>]
[/i]
[/d label_name=label.value]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -