#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass book
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding utf8
\fontencoding global
\font_roman "times" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 10
\spacing single
\use_hyperref false
\papersize a4paper
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 0
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\leftmargin 10mm
\rightmargin 10mm
\secnumdepth 2
\tocdepth 2
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Title
gputils 1.5.0
\end_layout

\begin_layout Author
James Bowman, Craig Franklin, David Barnett, Borut Ražem and Molnár Károly
\end_layout

\begin_layout Date
2016 Aug 15
\end_layout

\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents

\end_inset


\end_layout

\begin_layout Chapter
Introduction
\end_layout

\begin_layout Standard
gputils is a collection of tools for Microchip (
\shape smallcaps
TM
\shape default
) PIC microcontrollers.
 It includes gpasm, gplink, and gplib.
 Each tool is intended to be an open source replacement for a corresponding
 Microchip (TM) tool.
 This manual covers the basics of running the tools.
 For more details on a microcontroller, consult the manual for the specific
 PICmicro product that you are using.
\end_layout

\begin_layout Standard
This document is part of gputils.
\end_layout

\begin_layout Standard
gputils is free software; you can redistribute it and/or modify it under
 the terms of the 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
GNU
\end_layout

\end_inset

GNU General Public 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
License
\end_layout

\end_inset

License as published by the Free Software Foundation; either version 2,
 or (at your option) any later version.
\end_layout

\begin_layout Standard
gputils is distributed in the hope that it will be useful, but WITHOUT ANY
 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
NO WARRANTY
\end_layout

\end_inset

WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.
\end_layout

\begin_layout Standard
See the GNU General Public License for more details.
 You should have received a copy of the GNU General Public License along
 with gputils; see the file COPYING.
 If not, write to the Free Software Foundation,
\end_layout

\begin_layout Standard
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
\end_layout

\begin_layout Section
Tool Flows
\end_layout

\begin_layout Standard
gputils can be used in two different ways: absolute asm mode and relocatable
 asm mode.
\end_layout

\begin_layout Subsection
Absolute Asm Mode
\end_layout

\begin_layout Standard
In absolute asm mode, an assembly language source file is directly converted
 into a hex file by gpasm.
 This method is absolute because the final addresses are hard coded into
 the source file.
\end_layout

\begin_layout Subsection
Relocatable Asm Mode
\end_layout

\begin_layout Standard
In relocatable asm mode, the microcontroller assembly source code is divided
 into separate modules.
 Each module is assembled into an object using gpasm.
 That object can be placed 
\begin_inset Quotes eld
\end_inset

anywhere
\begin_inset Quotes erd
\end_inset

 in microcontroller's memory.
 Then gplink is used to resolve symbols references, assign final address,
 and to patch the machine code with the final addresses.
 The output from gplink is an absolute executable object.
\end_layout

\begin_layout Subsection
Which Tool Flow is best?
\end_layout

\begin_layout Standard
Absolute mode is simple to understand and to use.
 It only requires one tool, gpasm.
 Most of the examples on Microchip's website use absolute mode.
 So why use relocatable mode?
\end_layout

\begin_layout Itemize
Code can be written without regard to addresses.
 This makes it easier to write and reuse.
\end_layout

\begin_layout Itemize
The objects can be archived to create a library, which also simplifies reuse.
\end_layout

\begin_layout Itemize
Recompiling a project can be faster, because you only compile the portions
 that have changed.
\end_layout

\begin_layout Itemize
Files can have local name spaces.
 The user chooses what symbols are global.
\end_layout

\begin_layout Standard
Most develpment tools use relocatable objects for these reasons.
 The few that don't are generally microcontroller tools.
 Their applications are so small that absolute mode isn't impractical.
 For PICs, relocatable mode has one big disadvantage.
 The bank and page control is a challenge.
\end_layout

\begin_layout Section
Supported processors
\begin_inset CommandInset label
LatexCommand label
name "sec:Supported-processors"

\end_inset

 
\end_layout

\begin_layout Standard
The gputils currently supports most processors supported by MPLABX v3.35.
 This includes the following processors:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
p10f200        p10f202        p10f204        p10f206        p10f220    
    p10f222        
\begin_inset Newline newline
\end_inset

p12c508        p12c508a       p12c509        p12c509a       p12ce518   
    p12ce519       
\begin_inset Newline newline
\end_inset

p12cr509a      p12f508        p12f509        p12f510        p12f519    
    p12f520        
\begin_inset Newline newline
\end_inset

p12f529t39a    p12f529t48a    p16c5x         p16c52         p16c54     
    p16c54a        
\begin_inset Newline newline
\end_inset

p16c54b        p16c54c        p16c55         p16c55a        p16c56     
    p16c56a        
\begin_inset Newline newline
\end_inset

p16c57         p16c57c        p16c58a        p16c58b        p16c505    
    p16cr54        
\begin_inset Newline newline
\end_inset

p16cr54a       p16cr54b       p16cr54c       p16cr56a       p16cr57a   
    p16cr57b       
\begin_inset Newline newline
\end_inset

p16cr57c       p16cr58a       p16cr58b       p16f54         p16f57     
    p16f59         
\begin_inset Newline newline
\end_inset

p16f505        p16f506        p16f526        p16f527        p16f570    
    p16hv540       
\begin_inset Newline newline
\end_inset

p12c671        p12c672        p12ce673       p12ce674       p16c61     
    p16c62         
\begin_inset Newline newline
\end_inset

p16c62a        p16c62b        p16c63         p16c63a        p16c64     
    p16c64a        
\begin_inset Newline newline
\end_inset

p16c65         p16c65a        p16c65b        p16c66         p16c67     
    p16c71         
\begin_inset Newline newline
\end_inset

p16c72         p16c72a        p16c73         p16c73a        p16c73b    
    p16c74         
\begin_inset Newline newline
\end_inset

p16c74a        p16c74b        p16c76         p16c77         p16c84     
    p16c432        
\begin_inset Newline newline
\end_inset

p16c433        p16c554        p16c557        p16c558        p16c620    
    p16c620a       
\begin_inset Newline newline
\end_inset

p16c621        p16c621a       p16c622        p16c622a       p16c642    
    p16c662        
\begin_inset Newline newline
\end_inset

p16c710        p16c711        p16c712        p16c715        p16c716    
    p16c717        
\begin_inset Newline newline
\end_inset

p16c745        p16c765        p16c770        p16c771        p16c773    
    p16c774        
\begin_inset Newline newline
\end_inset

p16c781        p16c782        p16c923        p16c924        p16c925    
    p16c926        
\begin_inset Newline newline
\end_inset

p16ce623       p16ce624       p16ce625       p16cr62        p16cr63    
    p16cr64        
\begin_inset Newline newline
\end_inset

p16cr65        p16cr72        p16cr83        p16cr84        p16cr620a  
    p16cxx         
\begin_inset Newline newline
\end_inset

                                                                       
                   
\begin_inset Newline newline
\end_inset

p10f320        p10f322        p10lf320       p10lf322       p12f609    
    p12f615        
\begin_inset Newline newline
\end_inset

p12f617        p12f629        p12f635        p12f675        p12f683    
    p12f752        
\begin_inset Newline newline
\end_inset

p12f1501       p12f1571       p12f1572       p12f1612       p12f1822   
    p12f1840       
\begin_inset Newline newline
\end_inset

p12hv609       p12hv615       p12hv752       p12lf1501      p12lf1552  
    p12lf1571      
\begin_inset Newline newline
\end_inset

p12lf1572      p12lf1612      p12lf1822      p12lf1840      p12lf1840t39a
  p12lf1840t48a  
\begin_inset Newline newline
\end_inset

p16f72         p16f73         p16f74         p16f76         p16f77     
    p16f83         
\begin_inset Newline newline
\end_inset

p16f84         p16f84a        p16f87         p16f88         p16f610    
    p16f616        
\begin_inset Newline newline
\end_inset

p16f627        p16f627a       p16f628        p16f628a       p16f630    
    p16f631        
\begin_inset Newline newline
\end_inset

p16f636        p16f639        p16f648a       p16f676        p16f677    
    p16f684        
\begin_inset Newline newline
\end_inset

p16f685        p16f687        p16f688        p16f689        p16f690    
    p16f707        
\begin_inset Newline newline
\end_inset

p16f716        p16f720        p16f721        p16f722        p16f722a   
    p16f723        
\begin_inset Newline newline
\end_inset

p16f723a       p16f724        p16f726        p16f727        p16f737    
    p16f747        
\begin_inset Newline newline
\end_inset

p16f753        p16f767        p16f777        p16f785        p16f818    
    p16f819        
\begin_inset Newline newline
\end_inset

p16f870        p16f871        p16f872        p16f873        p16f873a   
    p16f874        
\begin_inset Newline newline
\end_inset

p16f874a       p16f876        p16f876a       p16f877        p16f877a   
    p16f882        
\begin_inset Newline newline
\end_inset

p16f883        p16f884        p16f886        p16f887        p16f913    
    p16f914        
\begin_inset Newline newline
\end_inset

p16f916        p16f917        p16f946        p16f1454       p16f1455   
    p16f1458       
\begin_inset Newline newline
\end_inset

p16f1459       p16f1503       p16f1507       p16f1508       p16f1509   
    p16f1512       
\begin_inset Newline newline
\end_inset

p16f1513       p16f1516       p16f1517       p16f1518       p16f1519   
    p16f1526       
\begin_inset Newline newline
\end_inset

p16f1527       p16f1574       p16f1575       p16f1578       p16f1579   
    p16f1613       
\begin_inset Newline newline
\end_inset

p16f1614       p16f1615       p16f1618       p16f1619       p16f1703   
    p16f1704       
\begin_inset Newline newline
\end_inset

p16f1705       p16f1707       p16f1708       p16f1709       p16f1713   
    p16f1716       
\begin_inset Newline newline
\end_inset

p16f1717       p16f1718       p16f1719       p16f1764       p16f1765   
    p16f1768       
\begin_inset Newline newline
\end_inset

p16f1769       p16f1773       p16f1776       p16f1777       p16f1778   
    p16f1779       
\begin_inset Newline newline
\end_inset

p16f1782       p16f1783       p16f1784       p16f1786       p16f1787   
    p16f1788       
\begin_inset Newline newline
\end_inset

p16f1789       p16f1823       p16f1824       p16f1825       p16f1826   
    p16f1827       
\begin_inset Newline newline
\end_inset

p16f1828       p16f1829       p16f1829lin    p16f1847       p16f1933   
    p16f1934       
\begin_inset Newline newline
\end_inset

p16f1936       p16f1937       p16f1938       p16f1939       p16f1946   
    p16f1947       
\begin_inset Newline newline
\end_inset

p16f15354      p16f15355      p16f18313      p16f18323      p16f18324  
    p16f18325      
\begin_inset Newline newline
\end_inset

p16f18326      p16f18344      p16f18345      p16f18346      p16f18854  
    p16f18855      
\begin_inset Newline newline
\end_inset

p16f18856      p16f18857      p16f18875      p16f18876      p16f18877  
    p16f19197      
\begin_inset Newline newline
\end_inset

p16hv610       p16hv616       p16hv753       p16hv785       p16lf74    
    p16lf76        
\begin_inset Newline newline
\end_inset

p16lf77        p16lf83        p16lf84        p16lf84a       p16lf87    
    p16lf88        
\begin_inset Newline newline
\end_inset

p16lf627       p16lf627a      p16lf628       p16lf628a      p16lf648a  
    p16lf707       
\begin_inset Newline newline
\end_inset

p16lf720       p16lf721       p16lf722       p16lf722a      p16lf723   
    p16lf723a      
\begin_inset Newline newline
\end_inset

p16lf724       p16lf726       p16lf727       p16lf747       p16lf767   
    p16lf777       
\begin_inset Newline newline
\end_inset

p16lf818       p16lf819       p16lf870       p16lf871       p16lf872   
    p16lf873       
\begin_inset Newline newline
\end_inset

p16lf873a      p16lf874       p16lf874a      p16lf876       p16lf876a  
    p16lf877       
\begin_inset Newline newline
\end_inset

p16lf877a      p16lf1454      p16lf1455      p16lf1458      p16lf1459  
    p16lf1503      
\begin_inset Newline newline
\end_inset

p16lf1507      p16lf1508      p16lf1509      p16lf1512      p16lf1513  
    p16lf1516      
\begin_inset Newline newline
\end_inset

p16lf1517      p16lf1518      p16lf1519      p16lf1526      p16lf1527  
    p16lf1554      
\begin_inset Newline newline
\end_inset

p16lf1559      p16lf1566      p16lf1567      p16lf1574      p16lf1575  
    p16lf1578      
\begin_inset Newline newline
\end_inset

p16lf1579      p16lf1613      p16lf1614      p16lf1615      p16lf1618  
    p16lf1619      
\begin_inset Newline newline
\end_inset

p16lf1703      p16lf1704      p16lf1705      p16lf1707      p16lf1708  
    p16lf1709      
\begin_inset Newline newline
\end_inset

p16lf1713      p16lf1716      p16lf1717      p16lf1718      p16lf1719  
    p16lf1764      
\begin_inset Newline newline
\end_inset

p16lf1765      p16lf1768      p16lf1769      p16lf1773      p16lf1776  
    p16lf1777      
\begin_inset Newline newline
\end_inset

p16lf1778      p16lf1779      p16lf1782      p16lf1783      p16lf1784  
    p16lf1786      
\begin_inset Newline newline
\end_inset

p16lf1787      p16lf1788      p16lf1789      p16lf1823      p16lf1824  
    p16lf1824t39a  
\begin_inset Newline newline
\end_inset

p16lf1825      p16lf1826      p16lf1827      p16lf1828      p16lf1829  
    p16lf1847      
\begin_inset Newline newline
\end_inset

p16lf1902      p16lf1903      p16lf1904      p16lf1906      p16lf1907  
    p16lf1933      
\begin_inset Newline newline
\end_inset

p16lf1934      p16lf1936      p16lf1937      p16lf1938      p16lf1939  
    p16lf1946      
\begin_inset Newline newline
\end_inset

p16lf1947      p16lf15354     p16lf15355     p16lf18313     p16lf18323 
    p16lf18324     
\begin_inset Newline newline
\end_inset

p16lf18325     p16lf18326     p16lf18344     p16lf18345     p16lf18346 
    p16lf18854     
\begin_inset Newline newline
\end_inset

p16lf18855     p16lf18856     p16lf18857     p16lf18875     p16lf18876 
    p16lf18877     
\begin_inset Newline newline
\end_inset

p16f1xxx                                                               
                   
\begin_inset Newline newline
\end_inset

                                                                       
                   
\begin_inset Newline newline
\end_inset

p17c42         p17c42a        p17c43         p17c44         p17c752    
    p17c756        
\begin_inset Newline newline
\end_inset

p17c756a       p17c762        p17c766        p17cr42        p17cr43    
    p17cxx         
\begin_inset Newline newline
\end_inset

                                                                       
                   
\begin_inset Newline newline
\end_inset

p18c242        p18c252        p18c442        p18c452        p18c601    
    p18c658        
\begin_inset Newline newline
\end_inset

p18c801        p18c858        p18cxx                                   
                   
\begin_inset Newline newline
\end_inset

                                                                       
                   
\begin_inset Newline newline
\end_inset

p18f13k22      p18f13k50      p18f14k22      p18f14k22lin   p18f14k50  
    p18f23k20      
\begin_inset Newline newline
\end_inset

p18f23k22      p18f24j10      p18f24j11      p18f24j50      p18f24k20  
    p18f24k22      
\begin_inset Newline newline
\end_inset

p18f24k40      p18f24k50      p18f25j10      p18f25j11      p18f25j50  
    p18f25k20      
\begin_inset Newline newline
\end_inset

p18f25k22      p18f25k40      p18f25k50      p18f25k80      p18f26j11  
    p18f26j13      
\begin_inset Newline newline
\end_inset

p18f26j50      p18f26j53      p18f26k20      p18f26k22      p18f26k40  
    p18f26k80      
\begin_inset Newline newline
\end_inset

p18f27j13      p18f27j53      p18f27k40      p18f43k20      p18f43k22  
    p18f44j10      
\begin_inset Newline newline
\end_inset

p18f44j11      p18f44j50      p18f44k20      p18f44k22      p18f45j10  
    p18f45j11      
\begin_inset Newline newline
\end_inset

p18f45j50      p18f45k20      p18f45k22      p18f45k40      p18f45k50  
    p18f45k80      
\begin_inset Newline newline
\end_inset

p18f46j11      p18f46j13      p18f46j50      p18f46j53      p18f46k20  
    p18f46k22      
\begin_inset Newline newline
\end_inset

p18f46k40      p18f46k80      p18f47j13      p18f47j53      p18f47k40  
    p18f63j11      
\begin_inset Newline newline
\end_inset

p18f63j90      p18f64j11      p18f64j15      p18f64j90      p18f65j10  
    p18f65j11      
\begin_inset Newline newline
\end_inset

p18f65j15      p18f65j50      p18f65j90      p18f65j94      p18f65k22  
    p18f65k40      
\begin_inset Newline newline
\end_inset

p18f65k80      p18f65k90      p18f66j10      p18f66j11      p18f66j15  
    p18f66j16      
\begin_inset Newline newline
\end_inset

p18f66j50      p18f66j55      p18f66j60      p18f66j65      p18f66j90  
    p18f66j93      
\begin_inset Newline newline
\end_inset

p18f66j94      p18f66j99      p18f66k22      p18f66k40      p18f66k80  
    p18f66k90      
\begin_inset Newline newline
\end_inset

p18f67j10      p18f67j11      p18f67j50      p18f67j60      p18f67j90  
    p18f67j93      
\begin_inset Newline newline
\end_inset

p18f67j94      p18f67k22      p18f67k40      p18f67k90      p18f83j11  
    p18f83j90      
\begin_inset Newline newline
\end_inset

p18f84j11      p18f84j15      p18f84j90      p18f85j10      p18f85j11  
    p18f85j15      
\begin_inset Newline newline
\end_inset

p18f85j50      p18f85j90      p18f85j94      p18f85k22      p18f85k90  
    p18f86j10      
\begin_inset Newline newline
\end_inset

p18f86j11      p18f86j15      p18f86j16      p18f86j50      p18f86j55  
    p18f86j60      
\begin_inset Newline newline
\end_inset

p18f86j65      p18f86j72      p18f86j90      p18f86j93      p18f86j94  
    p18f86j99      
\begin_inset Newline newline
\end_inset

p18f86k22      p18f86k90      p18f87j10      p18f87j11      p18f87j50  
    p18f87j60      
\begin_inset Newline newline
\end_inset

p18f87j72      p18f87j90      p18f87j93      p18f87j94      p18f87k22  
    p18f87k90      
\begin_inset Newline newline
\end_inset

p18f95j94      p18f96j60      p18f96j65      p18f96j94      p18f96j99  
    p18f97j60      
\begin_inset Newline newline
\end_inset

p18f97j94      p18f242        p18f248        p18f252        p18f258    
    p18f442        
\begin_inset Newline newline
\end_inset

p18f448        p18f452        p18f458        p18f1220       p18f1230   
    p18f1320       
\begin_inset Newline newline
\end_inset

p18f1330       p18f2220       p18f2221       p18f2320       p18f2321   
    p18f2331       
\begin_inset Newline newline
\end_inset

p18f2410       p18f2420       p18f2423       p18f2431       p18f2439   
    p18f2450       
\begin_inset Newline newline
\end_inset

p18f2455       p18f2458       p18f2480       p18f2510       p18f2515   
    p18f2520       
\begin_inset Newline newline
\end_inset

p18f2523       p18f2525       p18f2539       p18f2550       p18f2553   
    p18f2580       
\begin_inset Newline newline
\end_inset

p18f2585       p18f2610       p18f2620       p18f2680       p18f2681   
    p18f2682       
\begin_inset Newline newline
\end_inset

p18f2685       p18f4220       p18f4221       p18f4320       p18f4321   
    p18f4331       
\begin_inset Newline newline
\end_inset

p18f4410       p18f4420       p18f4423       p18f4431       p18f4439   
    p18f4450       
\begin_inset Newline newline
\end_inset

p18f4455       p18f4458       p18f4480       p18f4510       p18f4515   
    p18f4520       
\begin_inset Newline newline
\end_inset

p18f4523       p18f4525       p18f4539       p18f4550       p18f4553   
    p18f4580       
\begin_inset Newline newline
\end_inset

p18f4585       p18f4610       p18f4620       p18f4680       p18f4681   
    p18f4682       
\begin_inset Newline newline
\end_inset

p18f4685       p18f6310       p18f6390       p18f6393       p18f6410   
    p18f6490       
\begin_inset Newline newline
\end_inset

p18f6493       p18f6520       p18f6525       p18f6527       p18f6585   
    p18f6620       
\begin_inset Newline newline
\end_inset

p18f6621       p18f6622       p18f6627       p18f6628       p18f6680   
    p18f6720       
\begin_inset Newline newline
\end_inset

p18f6722       p18f6723       p18f8310       p18f8390       p18f8393   
    p18f8410       
\begin_inset Newline newline
\end_inset

p18f8490       p18f8493       p18f8520       p18f8525       p18f8527   
    p18f8585       
\begin_inset Newline newline
\end_inset

p18f8620       p18f8621       p18f8622       p18f8627       p18f8628   
    p18f8680       
\begin_inset Newline newline
\end_inset

p18f8720       p18f8722       p18f8723       p18lf13k22     p18lf13k50 
    p18lf14k22     
\begin_inset Newline newline
\end_inset

p18lf14k50     p18lf23k22     p18lf24j10     p18lf24j11     p18lf24j50 
    p18lf24k22     
\begin_inset Newline newline
\end_inset

p18lf24k40     p18lf24k50     p18lf25j10     p18lf25j11     p18lf25j50 
    p18lf25k22     
\begin_inset Newline newline
\end_inset

p18lf25k40     p18lf25k50     p18lf25k80     p18lf26j11     p18lf26j13 
    p18lf26j50     
\begin_inset Newline newline
\end_inset

p18lf26j53     p18lf26k22     p18lf26k40     p18lf26k80     p18lf27j13 
    p18lf27j53     
\begin_inset Newline newline
\end_inset

p18lf27k40     p18lf43k22     p18lf44j10     p18lf44j11     p18lf44j50 
    p18lf44k22     
\begin_inset Newline newline
\end_inset

p18lf45j10     p18lf45j11     p18lf45j50     p18lf45k22     p18lf45k40 
    p18lf45k50     
\begin_inset Newline newline
\end_inset

p18lf45k80     p18lf46j11     p18lf46j13     p18lf46j50     p18lf46j53 
    p18lf46k22     
\begin_inset Newline newline
\end_inset

p18lf46k40     p18lf46k80     p18lf47j13     p18lf47j53     p18lf47k40 
    p18lf65k40     
\begin_inset Newline newline
\end_inset

p18lf65k80     p18lf66k40     p18lf66k80     p18lf67k40     p18lf242   
    p18lf248       
\begin_inset Newline newline
\end_inset

p18lf252       p18lf258       p18lf442       p18lf448       p18lf452   
    p18lf458       
\begin_inset Newline newline
\end_inset

p18lf1220      p18lf1230      p18lf1320      p18lf1330      p18lf2220  
    p18lf2221      
\begin_inset Newline newline
\end_inset

p18lf2320      p18lf2321      p18lf2331      p18lf2410      p18lf2420  
    p18lf2423      
\begin_inset Newline newline
\end_inset

p18lf2431      p18lf2439      p18lf2450      p18lf2455      p18lf2458  
    p18lf2480      
\begin_inset Newline newline
\end_inset

p18lf2510      p18lf2515      p18lf2520      p18lf2523      p18lf2525  
    p18lf2539      
\begin_inset Newline newline
\end_inset

p18lf2550      p18lf2553      p18lf2580      p18lf2585      p18lf2610  
    p18lf2620      
\begin_inset Newline newline
\end_inset

p18lf2680      p18lf2682      p18lf2685      p18lf4220      p18lf4221  
    p18lf4320      
\begin_inset Newline newline
\end_inset

p18lf4321      p18lf4331      p18lf4410      p18lf4420      p18lf4423  
    p18lf4431      
\begin_inset Newline newline
\end_inset

p18lf4439      p18lf4450      p18lf4455      p18lf4458      p18lf4480  
    p18lf4510      
\begin_inset Newline newline
\end_inset

p18lf4515      p18lf4520      p18lf4523      p18lf4525      p18lf4539  
    p18lf4550      
\begin_inset Newline newline
\end_inset

p18lf4553      p18lf4580      p18lf4585      p18lf4610      p18lf4620  
    p18lf4680      
\begin_inset Newline newline
\end_inset

p18lf4682      p18lf4685      p18lf6310      p18lf6390      p18lf6393  
    p18lf6410      
\begin_inset Newline newline
\end_inset

p18lf6490      p18lf6493      p18lf6520      p18lf6525      p18lf6527  
    p18lf6585      
\begin_inset Newline newline
\end_inset

p18lf6620      p18lf6621      p18lf6622      p18lf6627      p18lf6628  
    p18lf6680      
\begin_inset Newline newline
\end_inset

p18lf6720      p18lf6722      p18lf6723      p18lf8310      p18lf8390  
    p18lf8393      
\begin_inset Newline newline
\end_inset

p18lf8410      p18lf8490      p18lf8493      p18lf8520      p18lf8525  
    p18lf8527      
\begin_inset Newline newline
\end_inset

p18lf8585      p18lf8620      p18lf8621      p18lf8622      p18lf8627  
    p18lf8628      
\begin_inset Newline newline
\end_inset

p18lf8680      p18lf8720      p18lf8722      p18lf8723                 
                   
\begin_inset Newline newline
\end_inset

                                                                       
                   
\begin_inset Newline newline
\end_inset

p14000                                                                 
                   
\begin_inset Newline newline
\end_inset

eeprom8        eeprom16                                                
                   
\begin_inset Newline newline
\end_inset

gen                                                                    
                   
\begin_inset Newline newline
\end_inset

hcs1365        hcs1370                                                 
                   
\begin_inset Newline newline
\end_inset

mcv08a         mcv14a         mcv18a         mcv28a                    
                   
\begin_inset Newline newline
\end_inset

ps500          ps810                                                   
                   
\begin_inset Newline newline
\end_inset

rf509af        rf509ag        rf675f         rf675h         rf675k     
                   
\begin_inset Newline newline
\end_inset

sx18           sx20           sx28           sx48           sx52
\end_layout

\begin_layout Chapter
gpasm
\end_layout

\begin_layout Section
Running gpasm
\begin_inset Index idx
status open

\begin_layout Plain Layout
gpasm options
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The general syntax for running gpasm is
\end_layout

\begin_layout LyX-Code
gpasm [options] asm-file
\end_layout

\begin_layout Standard
Where options can be one of:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="27" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="3.5cm">
<column alignment="left" valignment="top" width="7.4cm">
<column alignment="block" valignment="top" width="7cm">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-a <format>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–hex-format <format>
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Produce 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
hex file
\end_layout

\end_inset

hex file in one of four formats: inhx8m, inhx8s, inhx16, inhx32 (the default).
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-c
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–object
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Output a relocatable object in the older version of the Microchip COFF format.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-C
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–old-coff
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Output a relocatable object in the old Microchip COFF format.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-d
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–debug
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Output debug messages.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-D symbol[=value] 
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–define symbol[=value]
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Equivalent to 
\begin_inset Quotes eld
\end_inset

#define <symbol> <value>
\begin_inset Quotes erd
\end_inset

.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-e [ON|OFF]
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–expand [ON|OFF]
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Expand macros in listing file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-f
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–full-address
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show full address in .lst file at the memory map region.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-g
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–debug-info
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Use debug directives for COFF.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-h
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–help
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display the help message.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-i
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–ignore-case
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
case
\end_layout

\end_inset

Ignore case in source code.
 By default gpasms to treats 
\begin_inset Quotes eld
\end_inset

fooYa
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

FOOYA
\begin_inset Quotes erd
\end_inset

 as being different.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-j
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–sdcc-dev16-list
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Help to the extension of the pic16devices.txt file in the sdcc project.
 Using by itself, displays the all '16e' devices.
 Along with the '-p' option, shows only the specified device.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-I <directory>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–include <directory>
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Specify an include directory.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-k
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–error
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enables the creation of the error file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-l[12[ce]|14[cef]|16[ce]]
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–list-chips[=(12[ce]|14[cef]|16[ce]])]
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
List the supported processors based on various aspects.
 ('f' mean 'x')
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-L
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–force-list
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Ignore nolist directives.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-m
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–dump
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Memory dump.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–mpasm-compatible
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MPASM(X) compatibility mode.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-M
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–deps
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Output a dependency file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-n
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–dos
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Use DOS style newlines (CRLF) in hex file.
 This option is disabled on win32 systems.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-o <file>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–output <file>
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Alternate name of output files.
 Option effect of:
\end_layout

\begin_layout Plain Layout
– If the 
\begin_inset Quotes eld
\end_inset

-c
\begin_inset Quotes erd
\end_inset

 option included in the command line: 
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

file.
\emph on
o
\emph default
, file.
\emph on
lst
\emph default
, file.
\emph on
err
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

(The 
\begin_inset Quotes eld
\end_inset

file.
\emph on
o
\emph default

\begin_inset Quotes erd
\end_inset

 should specified.)
\end_layout

\begin_layout Plain Layout
– If the 
\begin_inset Quotes eld
\end_inset

-c
\begin_inset Quotes erd
\end_inset

 option 
\emph on
not
\emph default
 included in the command line:
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

file.
\emph on
hex
\emph default
, file.
\emph on
cod
\emph default
, file.
\emph on
lst
\emph default
, file.
\emph on
err
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

(The 
\begin_inset Quotes eld
\end_inset

file.
\emph on
hex
\emph default

\begin_inset Quotes erd
\end_inset

 should specified.)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-p <processor> 
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–processor <processor>
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Select target processor.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-P <file>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–preprocess <file>
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write preprocessed asm file to <file>.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-q
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–quiet
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Suppress anything sent to standard output.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-r <radix>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–radix <radix>
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set the 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
radix
\end_layout

\end_inset

radix, i.e.
 the number base that gpasm uses when interpreting numbers.<radix> can be
 one of 
\begin_inset Quotes eld
\end_inset

oct
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Quotes eld
\end_inset

dec
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

hex
\begin_inset Quotes erd
\end_inset

 for bases eight, ten, and sixteen respectively.
 Default is 
\begin_inset Quotes eld
\end_inset

hex
\begin_inset Quotes erd
\end_inset

.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-s[12[ce]|14[cef]|16[ce]]
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–list-processor-properties[=([12[ce]|14[cef]|16[ce]])]
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Lists properties of the processors.
 Using by itself, displays the all devices or group of the devices.
 Along with the '-p' option, shows only the specified device.
 ('f' mean 'x')
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-S [0|1|2]
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strict [0|1|2]
\end_layout

\end_inset
</cell>
<cell alignment="block" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set the strict level of the recommended instruction-parameters (W or F and
 A or B) and the "Undefined Processor" messages.
 The "strict messages" have higher priority than the warnings.
 (See: -w [0|1|2])
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

0: Is the default.
 No strict messages.
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

1: Show warning messages if one of is missing.
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

2: Show error messages if one of is missing.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="3.5cm">
<column alignment="left" valignment="top" width="7.4cm">
<column alignment="left" valignment="top" width="7cm">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-t
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–sdcc-dev14-list
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Help to the extension of the pic14devices.txt file in the sdcc project.
 Using by itself, displays the all '14', '14e' and '14f' devices.
 Along with the '-p' option, shows only the specified device.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strict-options
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
If this is set, then an option may not be parameter of an another option.
 For example: -I -c
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-u
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–absolute
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Use absolute paths.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-v
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show version information and exit.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-w [0|1|2]
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–warning [0|1|2]
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set the message level.
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

0: Is the default.
 It will allow all messages,
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

warnings, and errors to be reported.
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

1: Will suppress the messages.
\end_layout

\begin_layout Plain Layout
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

2: Will suppress the messages and warnings.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–macro-dereference
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Use the source from where the macro was invoked for errors.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-y
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–extended
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enable 18xx extended mode.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset

Unless otherwise specified, gpasm removes the 
\begin_inset Quotes eld
\end_inset

.asm
\begin_inset Quotes erd
\end_inset

 suffix from its input file, replacing it with 
\begin_inset Quotes eld
\end_inset

.lst
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

.hex
\begin_inset Quotes erd
\end_inset

 for the list and hex output files respectively.
 On most modern operating systems case is significant in filenames.
 For this reason you should ensure that filenames are named consistently,
 and that the 
\begin_inset Quotes eld
\end_inset

.asm
\begin_inset Quotes erd
\end_inset

 suffix on any source file is in lower case.
\end_layout

\begin_layout Standard
gpasm always produces a 
\begin_inset Quotes eld
\end_inset

.lst
\begin_inset Quotes erd
\end_inset

 file.
 If it runs without errors, it also produces a 
\begin_inset Quotes eld
\end_inset

.hex
\begin_inset Quotes erd
\end_inset

 file or a 
\begin_inset Quotes eld
\end_inset

.o
\begin_inset Quotes erd
\end_inset

 file.
\end_layout

\begin_layout Subsection
MPASM(X) compatibility mode
\end_layout

\begin_layout Standard
When the –mpasm-compatible command line option is specified gpasm tries
 to mimic MPASM(X) behaviour:
\end_layout

\begin_layout Itemize
code_pack section doesn't generate line symbols in coff file; the consequence
 is missing object file info in the generated linker listing file.
\end_layout

\begin_layout Itemize
x << n is actually x << (n % (sizeof(int) * 8)) * on x86 architectures,
 so 0x1234 << 32 results 0x1234 which is wrong but compatible with MPASM(X)
\end_layout

\begin_layout Itemize
Can not use these directives: ASSUME, ELIF, ELIFNDEF, ELIFDEF
\end_layout

\begin_layout Itemize
Can not use almost all the 
\begin_inset Quotes eld
\end_inset

Predefined constants
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Itemize
Can not use the 
\begin_inset Quotes eld
\end_inset

Built-in variables
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Subsection
Using gpasm with 
\begin_inset Quotes eld
\end_inset

make
\begin_inset Quotes erd
\end_inset


\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
make
\end_layout

\end_inset


\end_layout

\begin_layout Standard
On most operating systems, you can build a project using the make utility.
 To use gpasm with make, you might have a 
\begin_inset Quotes eld
\end_inset

makefile
\begin_inset Quotes erd
\end_inset

 like this:
\end_layout

\begin_layout LyX-Code
tree.hex: tree.asm treedef.inc
\begin_inset Newline newline
\end_inset

        gpasm tree.asm
\end_layout

\begin_layout Standard
This will rebuild 
\begin_inset Quotes eld
\end_inset

tree.hex
\begin_inset Quotes erd
\end_inset

 whenever either of the 
\begin_inset Quotes eld
\end_inset

tree.asm
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

treedef.inc
\begin_inset Quotes erd
\end_inset

 files change.
 A more comprehensive example of using gpasm with makefiles is included
 as example1 in the gpasm source distribution.
\end_layout

\begin_layout Subsection
Dealing with errors
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
error file
\end_layout

\end_inset


\end_layout

\begin_layout Standard
gpasm doesn't specifically create an error file.
 This can be a problem if you want to keep a record of errors, or if your
 assembly produces so many errors that they scroll off the screen.
 To deal with this if your shell is 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
sh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

sh
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
bash
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

bash
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ksh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

ksh
\begin_inset Quotes erd
\end_inset

, you can do something like:
\end_layout

\begin_layout LyX-Code
gpasm tree.asm 2>&1 | tee tree.err
\end_layout

\begin_layout Standard
This redirects standard error to standard output (
\begin_inset Quotes eld
\end_inset

2>&1
\begin_inset Quotes erd
\end_inset

), then pipes this output into 
\begin_inset Quotes eld
\end_inset


\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
tee
\end_layout

\end_inset

tee
\begin_inset Quotes erd
\end_inset

, which copies it input to 
\begin_inset Quotes eld
\end_inset

tree.err
\begin_inset Quotes erd
\end_inset

, and then displays it.
\end_layout

\begin_layout Section
Syntax
\end_layout

\begin_layout Subsection
File structure
\end_layout

\begin_layout Standard
The gpasm source files consist of a series of lines.
 Lines can contain a 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
labels
\end_layout

\end_inset

label (starting in column 1) or an operation (starting in any column after
 1), both, or neither.
 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
comments
\end_layout

\end_inset

Comments follow a 
\begin_inset Quotes eld
\end_inset

;
\begin_inset Quotes erd
\end_inset

 character, and are treated as a newline.
 Labels may be any series of the letters A-z, digits 0-9, and the underscore
 (
\begin_inset Quotes eld
\end_inset

_
\begin_inset Quotes erd
\end_inset

); they may not begin with a digit.
 Labels may be followed by a colon (
\begin_inset Quotes eld
\end_inset

:
\begin_inset Quotes erd
\end_inset

).
\end_layout

\begin_layout Standard
An operation is a single identifier (the same rules as for a label above)
 followed by a space, and a comma-separated list of parameters.
 For example, the following are all legal source lines:
\end_layout

\begin_layout LyX-Code
                              ; Blank line
\begin_inset Newline newline
\end_inset

loop    sleep                 ; Label and operation
\begin_inset Newline newline
\end_inset

        incf    6,1           ; Operation with 2 parameters
\begin_inset Newline newline
\end_inset

        goto    loop          ; Operation with 1 parameter
\end_layout

\begin_layout Standard
The length of the label and symbol names it is recommended to restrict less
 than 256 characters.
 This is is mainly worth doing because of the .COD files built-in limitations
 (e.g.
 Long Symbol Table).
\end_layout

\begin_layout Subsection
Expressions
\end_layout

\begin_layout Standard
The gpasm expressions are implemented using 32-bit arithmetic.
 gpasm supports a full set of 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
operators
\end_layout

\end_inset

operators, based on the C operator set.
 The operators in the following table are arranged in groups of equal precedence
, but the groups are arranged in order of increasing precedence.
 When gpasm encounters operators of equal precedence, it always evaluates
 from left to right.
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="26" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Operator
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
assignment
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
||
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
logical or
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
&&
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
logical and
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
&
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bitwise and
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
|
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bitwise or
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
^
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bitwise exclusive-or
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
less than
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
greater than
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
==
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
equals
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
!=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
not equals
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
>=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
greater than or equal
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
less than or equal
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<<
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
left shift
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
>>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
right shift
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
addition
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
subtraction
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
*
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
multiplication
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
/
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
division
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
%
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
modulo
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
UPPER
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
upper byte
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
HIGH
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
high byte
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
LOW
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
low byte
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
negation
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
!
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
logical not
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
~
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bitwise no
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\align left
Any symbol appearing in column 1 may be assigned a value using the assignment
 operator (=) in the previous table.
 Additionally, any value previously assigned may be modified using one of
 the operators in the table below.
 Each of these operators evaluates the current value of the symbol and then
 assigns a new value based on the operator.
 
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="14" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Operator
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
assignment
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
++
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
increment by 1
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
decrement by 1
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
increment
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
decrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
*=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
multiply
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
/=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
divide
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
%=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
modulo
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
<<=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
left shift
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
>>=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
right shift
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
&=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bitwise and
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
|=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bitwise or
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
^=
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
bitwise exclusive-or
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Subsection
Numbers
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
radix
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
name "sec:numbers"

\end_inset

gpasm gives you several ways of specifying numbers.
 You can use a syntax that uses an initial character to indicate the number's
 base.
 The following table summarizes the alternatives.
 Note the C-style option for specifying hexadecimal numbers.
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="3">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
base
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
general syntax
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
21 decimal written as
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
binary
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
B'[01]*'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
B'10101'
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
octal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
O'[0-7]*'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
O'25'
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
decimal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
D'[0-9]*'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
D'21'
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
hex
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
H'[0-F]*'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
H'15'
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
hex
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0x[0-F]*
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0x15
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
When you write a number without a specifying prefix such as 
\begin_inset Quotes eld
\end_inset

45
\begin_inset Quotes erd
\end_inset

, gpasm uses the current radix (base) to interpret the number.
 You can change this radix with the RADIX directive, or with the 
\begin_inset Quotes eld
\end_inset

-r
\begin_inset Quotes erd
\end_inset

 option on gpasm's command-line.
 The default radix is hexadecimal.
 
\end_layout

\begin_layout Standard
If you do not start hexadecimal numbers with a digit, gpasm will attempt
 to interpret what you've written as an identifier.
 For example, instead of writing C2, write either 0C2, 0xC2 or H'C2'.
\end_layout

\begin_layout Standard
Case is not significant when interpreting numbers: 0ca, 0CA, h'CA' and H'ca'
 are all equivalent.
\end_layout

\begin_layout Standard
Several legacy mpasm number formats are also supported.
 These formats have various shortcomings, but are still supported.
 The table below summarizes them.
 
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="3">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
base
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
general syntax
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
21 decimal written as
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
binary
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
[01]*b
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
10101b
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
octal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
q'[0-7]*'
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
q'25'
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
octal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
[0-7]*o
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
25o
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
octal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
[0-7]*q
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
25q
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
decimal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
[0-9]*d
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
21d
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
decimal
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.[0-9]*
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
.21
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
hex
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
[0-F]*h
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
15h
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
You can write the 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ASCII
\end_layout

\end_inset

ASCII code for a 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
character
\end_layout

\end_inset

character X using 'X', or A'X'.
 
\end_layout

\begin_layout Subsection
Preprocessor
\end_layout

\begin_layout Standard
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
include
\end_layout

\end_inset

A line such as:
\end_layout

\begin_layout LyX-Code
include foo.inc
\end_layout

\begin_layout Standard
Will make gpasm fetch source lines from the file 
\begin_inset Quotes eld
\end_inset

foo.inc
\begin_inset Quotes erd
\end_inset

 until the end of the file, and then return to the original source file
 at the line following the include.
\end_layout

\begin_layout Standard
Lines beginning with a 
\begin_inset Quotes eld
\end_inset

#
\begin_inset Quotes erd
\end_inset

 are preprocessor directives, and are treated differently by gpasm.
 They may contain a 
\begin_inset Quotes eld
\end_inset

#define
\begin_inset Quotes erd
\end_inset

, or a 
\begin_inset Quotes eld
\end_inset

#undefine
\begin_inset Quotes erd
\end_inset

 directive.
\end_layout

\begin_layout Standard
Once gpasm has processed a line such as:
\end_layout

\begin_layout LyX-Code
#define X Y
\end_layout

\begin_layout Standard
Every subsequent occurrence of X is replaced with Y, until the end of file
 or a line
\end_layout

\begin_layout LyX-Code
#undefine X
\end_layout

\begin_layout Standard
appears.
 The preprocessor will replace an occurance of #v(expression) in a symbol
 with the value of 
\begin_inset Quotes eld
\end_inset

expression
\begin_inset Quotes erd
\end_inset

 in decimal.
 In the following expression:
\end_layout

\begin_layout LyX-Code
number equ 5
\begin_inset Newline newline
\end_inset

label_#v((number + 1) * 5)_suffix equ 0x10
\end_layout

\begin_layout Standard
The gpasm will place the symbol 
\begin_inset Quotes eld
\end_inset

label_30_suffix
\begin_inset Quotes erd
\end_inset

 with a value of 0x10 in the symbol table.
 The preprocessor in gpasm is only 
\shape italic
like
\shape default
 the C preprocessor; its syntax and semantic is rather different from that
 of the C preprocessor.
\end_layout

\begin_layout Subsection
Processor header files
\end_layout

\begin_layout Standard
gputils distributes the Microchip processor header files.
 These files contain processor specific data that is helpful in developing
 PIC applications.
 The location of these files is reported in the gpasm help message.
 Use the INCLUDE directive to utilize the appropriate file in your source
 code.
 Only the name of the file is required.
 gpasm will search the default path automatically.
\end_layout

\begin_layout Subsection
Predefined constants
\end_layout

\begin_layout Standard
The device ID:
\end_layout

\begin_layout LyX-Code
__18F4520 -- If the type of the processor is P18F4520.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard

\series bold
The following constants exist 
\emph on
only
\emph default
 in the 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option).
\series default

\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset

The version numbers of gputils:
\end_layout

\begin_layout LyX-Code
__GPUTILS_SVN_VERSION   -- e.g.
 1181
\end_layout

\begin_layout LyX-Code
__GPUTILS_VERSION_MAJOR -- e.g.
 1
\end_layout

\begin_layout LyX-Code
__GPUTILS_VERSION_MINOR -- e.g.
 4
\end_layout

\begin_layout LyX-Code
__GPUTILS_VERSION_MICRO -- e.g.
 2
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The size of the instruction set of processor (of course, at the same time
 only one exists):
\end_layout

\begin_layout LyX-Code
__12_BIT            -- e.g.
 p10f222
\end_layout

\begin_layout LyX-Code
__14_BIT            -- e.g.
 p16f887
\end_layout

\begin_layout LyX-Code
__16_BIT            -- e.g.
 p18f2523
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The sign of advanced types:
\end_layout

\begin_layout LyX-Code
__ENHANCED          -- e.g.
 p12f1501, p16f527, p16f1519
\end_layout

\begin_layout LyX-Code
__EXTENDED          -- all PIC18XXX
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The bounds of the Lower Access RAM area (
\emph on
only
\emph default
 in the Extended 16 bit core: PIC18XXX):
\end_layout

\begin_layout LyX-Code
__ACC_RAM_LOW_START -- 0x00
\end_layout

\begin_layout LyX-Code
__ACC_RAM_LOW_END   -- e.g.
 0x5F, 0x7F
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The properties of RAM Banks:
\end_layout

\begin_layout LyX-Code
__BANK_BITS         -- These bits select the active RAM Bank.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 0x20, 0x180, 0xF00)
\end_layout

\begin_layout LyX-Code
__BANK_MASK         -- These bits give the address of a register within
 a RAM Bank.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 0x1F, 0x7F, 0xFF)
\end_layout

\begin_layout LyX-Code
__BANK_SHIFT        -- This is shift value of bank number in full RAM address.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 12 bit core: 5; 14 bit core: 7; 16 bit core: 8)
\end_layout

\begin_layout LyX-Code
__BANK_SIZE         -- This is a RAM Bank size.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 32 {0x20}, 128 {0x80}, 256 {0x100}) -- (1 << __BANK_SHIFT)
\end_layout

\begin_layout LyX-Code
__BANK_INV          -- This the invalid RAM Bank value (-1).
\end_layout

\begin_layout LyX-Code
__NUM_BANKS         -- Number of RAM Banks.
\end_layout

\begin_layout LyX-Code
__BANK_0            -- Address of first RAM Bank (0x000).
 This definitely exists.
\end_layout

\begin_layout LyX-Code
__BANK_n            -- Address of last RAM Bank, if more than one exists.
 (n = __NUM_BANKS - 1)
\end_layout

\begin_layout LyX-Code
__BANK_FIRST        -- Address of first RAM Bank (0x000).
 This definitely exists.
\end_layout

\begin_layout LyX-Code
__BANK_LAST         -- Address of last RAM Bank.
 This definitely exists.
 (This in some cases identical with the first.)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The properties of ROM Pages (only in the 12 and 14 bit core: PIC12XXX, PIC16XXX)
:
\end_layout

\begin_layout LyX-Code
__PAGE_BITS         -- These bits select the active ROM Page.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 0x600, 0x1800, 0x7800, etc)
\end_layout

\begin_layout LyX-Code
__PAGE_MASK         -- These bits give the address of an instruction within
 a ROM Page.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 0x1FF, 0x7FF)
\end_layout

\begin_layout LyX-Code
__PAGE_SHIFT        -- This is shift value of page number in full ROM address.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 12 bit core: 9; 14 bit core: 11; 16 bit old core: 13)
\end_layout

\begin_layout LyX-Code
__PAGE_SIZE         -- This is a ROM Page size.
\end_layout

\begin_layout LyX-Code
                       (e.g.
 512 {0x200}, 2048 {0x800}) -- (1 << __PAGE_SHIFT)
\end_layout

\begin_layout LyX-Code
__PAGE_INV          -- This the invalid ROM Page value (-1).
\end_layout

\begin_layout LyX-Code
__NUM_PAGES         -- Number of ROM Pages.
\end_layout

\begin_layout LyX-Code
__PAGE_0            -- Address of first ROM Page (0x0000).
 This definitely exists.
\end_layout

\begin_layout LyX-Code
__PAGE_n            -- Address of last ROM Page, if more than one exists.
 (n = __NUM_PAGES - 1)
\end_layout

\begin_layout LyX-Code
__PAGE_FIRST        -- Address of first ROM Page (0x0000).
 This definitely exists.
\end_layout

\begin_layout LyX-Code
__PAGE_LAST         -- Address of last ROM Page.
 This definitely exists.
 (This in some cases identical with the first.)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The bounds of the Common RAM area, 
\emph on
if
\emph default
 this memory
\emph on
 exists
\emph default
 (in the 12, 14 and 16 bit core: PIC12XXX, PIC16XXX, PIC18XXX):
\end_layout

\begin_layout Standard
(This exists, only in the bank 0, the same can be achieved from other banks.)
\end_layout

\begin_layout LyX-Code
__COMMON_RAM_START -- Start address of the Common RAM area.
   (e.g.
 0x07, 0x0C, 0x70, 0x000)
\end_layout

\begin_layout LyX-Code
                      (The implementation of the Common RAM inconsistent
 in some old processors:
\end_layout

\begin_layout LyX-Code
                       PIC16F72, PIC16F73, ...)
\end_layout

\begin_layout LyX-Code
__COMMON_RAM_END   -- End address of the Common RAM area.
     (e.g.
 0x0F, 0x2F, 0x7F)
\end_layout

\begin_layout LyX-Code
                      (The implementation of the Common RAM inconsistent
 in some old processors:
\end_layout

\begin_layout LyX-Code
                       PIC16F72, PIC16F73, ...)
\end_layout

\begin_layout LyX-Code
__COMMON_RAM_MAX   -- Maximum address of the Common RAM area.
 (e.g.
 0x6F) (This rarely exists.)
\end_layout

\begin_layout LyX-Code
                      (Only in in the 12 and 14 bit core: PIC12XXX, PIC16XXX)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The bounds of the Linear RAM area, 
\emph on
if
\emph default
 this memory
\emph on
 exists
\emph default
 (
\emph on
only
\emph default
 in the Enhanced 14 bit core: PIC16XXX):
\end_layout

\begin_layout LyX-Code
__LINEAR_RAM_START -- Start address of the Linear RAM area.
 (e.g.
 0x2000, 0x2000)
\end_layout

\begin_layout LyX-Code
__LINEAR_RAM_END   -- End address of the Linear RAM area.
   (e.g.
 0x202F, 0x23EF)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The bounds of the IDLOCS area, 
\emph on
if
\emph default
 this memory
\emph on
 exists
\emph default
 (These constants generally are not necessary, nevertheless exists if should
 be somebody.):
\end_layout

\begin_layout LyX-Code
__IDLOCS_START     -- Start address of the IDLOCS area.
 (e.g.
 0x0440, 0x2000, 0x8000, 0x200000)
\end_layout

\begin_layout LyX-Code
__IDLOCS_END       -- End address of the IDLOCS area.
   (e.g.
 0x0443, 0x2003, 0x8003, 0x200007)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The bounds of the CONFIG area (These constants generally are not necessary,
 nevertheless exists if should be somebody.):
\end_layout

\begin_layout LyX-Code
__CONFIG_START     -- Start address of the CONFIG area.
 (e.g.
 0x0FFF, 0x2007, 0x8007, 0x300000)
\end_layout

\begin_layout LyX-Code
__CONFIG_END       -- End address of the CONFIG area.
   (e.g.
 0x0FFF, 0x2007, 0x800A, 0x30000D)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The bounds of the EEPROM area, 
\emph on
if
\emph default
 this memory
\emph on
 exists
\emph default
:
\end_layout

\begin_layout LyX-Code
__EEPROM_START     -- Start address of the EEPROM area.
 (e.g.
 0x0400, 0x2100, 0xF000, 0x310000, 0xF00000)
\end_layout

\begin_layout LyX-Code
__EEPROM_END       -- End address of the EEPROM area.
   (e.g.
 0x043F, 0x21FF, 0xF0FF, 0x3103FF, 0xF000FF)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The bounds of the program memory:
\end_layout

\begin_layout LyX-Code
__CODE_START       -- Start address of the instruction area.
\end_layout

\begin_layout LyX-Code
__CODE_END         -- End address of the instruction area.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Addresses of the vectors:
\end_layout

\begin_layout LyX-Code
__VECTOR_RESET     -- Address of the Reset Vector.
 (all pic)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
__VECTOR_INT       -- Address of the Interrupt Vector.
 (14 bit core: PIC12XXX, PIC16XXX)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
__VECTOR_INT_EXT   -- Address of the External Interrupt Vector.
 (PIC17XXX)
\end_layout

\begin_layout LyX-Code
__VECTOR_INT_TMR0  -- Address of the Timer0 Interrupt Vector.
 (16 bit core: PIC17XXX)
\end_layout

\begin_layout LyX-Code
__VECTOR_INT_T0CKI -- Address of the T0CKI Pin Interrupt Vector.
 (16 bit core: PIC17XXX)
\end_layout

\begin_layout LyX-Code
__VECTOR_INT_PERI  -- Address of the Peripheral Interrupt Vector.
 (16 bit core: PIC17XXX)
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
__VECTOR_INT_HIGH  -- Address of the High Priority Interrupt Vector.
 (Extended 16 bit core:
\end_layout

\begin_layout LyX-Code
                      PIC18XXX)
\end_layout

\begin_layout LyX-Code
__VECTOR_INT_LOW   -- Address of the Low Priority Interrupt Vector.
 (Extended 16 bit core:
\end_layout

\begin_layout LyX-Code
                      PIC18XXX)
\end_layout

\begin_layout Standard
Maximum count of loop for the WHILE directive:
\end_layout

\begin_layout LyX-Code
__WHILE_LOOP_COUNT_MAX
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsection
Built-in variables
\end_layout

\begin_layout Standard

\series bold
The following variables exist 
\emph on
only
\emph default
 in the 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option).
\series default

\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset

The last time selected (with BANKSEL directive, or MOVLB instruction) RAM
 Bank.
 Partially or completely is still usable: bcf/bcf FSR, [5-7] (12 bit), bcf/bsf
 STATUS, RP[0-1] (14 bit)
\begin_inset Newline newline
\end_inset

– This value becomes invalid (__BANK_INV) after the following instructions,
 in the (Enhanced and Regular) 12 bit and 14 bit core – PIC12XXX, PIC16XXX:
\end_layout

\begin_layout Standard
BRA, BRW, CALL, CALLW, GOTO, RESET, RETFIE, RETLW, RETURN, (SX: RETI, RETIW,
 RETP)
\begin_inset Newline newline
\end_inset

– This value becomes invalid (__BANK_INV) after the following instructions,
 in the Regular 16 bit core – PIC17XXX:
\end_layout

\begin_layout Standard
CALL, GOTO, LCALL, RETFIE, RETLW, RETURN
\begin_inset Newline newline
\end_inset

– This value becomes invalid (__BANK_INV) after the following instructions,
 in the Extended 16 bit core – PIC18XXX:
\end_layout

\begin_layout Standard
BRA, CALL, CALLW, GOTO, RCALL, RESET, RETFIE, RETLW, RETURN, TRET
\end_layout

\begin_layout Standard
Except: 
\begin_inset Quotes eld
\end_inset

CALL label, FAST
\begin_inset Quotes erd
\end_inset

 (The important thing is the presence of the 
\begin_inset Quotes eld
\end_inset

FAST
\begin_inset Quotes erd
\end_inset

 modifier.)
\end_layout

\begin_layout LyX-Code
__ACTIVE_BANK_ADDR  -- e.g.
 0x20, 0x080, 0xE00, etc (may __BANK_INV also)
\end_layout

\begin_deeper
\begin_layout Standard
See also: BANKSEL (primarily in absolute mode)
\end_layout

\end_deeper
\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The last time assumed (with ASSUME directive) RAM Bank.
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
__ASSUMED_BANK_ADDR -- e.g.
 0x20, 0x080, 0xE00, etc (may __BANK_INV also)
\end_layout

\begin_deeper
\begin_layout Standard
See also: ASSUME (primarily in absolute mode)
\end_layout

\end_deeper
\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The last time selected (with PAGESEL or PAGESELW directive, or MOVLP instruction
) ROM Page in the (Enhanced and Regular) 12 and 14 bit core – PIC12XXX,
 PIC16XXX.Partially or completely is still usable: bcf/bcf STATUS, PA[0-2]
 (12 bit), bcf/bsf PCLATH, [3-4] (14 bit)
\begin_inset Newline newline
\end_inset

– This value becomes invalid (__PAGE_INV) after the following instructions:
\end_layout

\begin_layout Standard
CALL, CALLW, RESET
\end_layout

\begin_layout LyX-Code
__ACTIVE_PAGE_ADDR -- e.g.
 0x400, 0x800, 0x2800, etc (may __PAGE_INV also)
\end_layout

\begin_deeper
\begin_layout Standard
See also: PAGESEL (only in absolute mode)
\end_layout

\end_deeper
\begin_layout Section
Directives
\end_layout

\begin_layout Subsection
Code generation
\end_layout

\begin_layout Standard
In absolute mode, use the ORG directive to set the PIC memory location where
 gpasm will start assembling code.
 If you don't specify an address with ORG, gpasm assumes 0x0000.
 In relocatable mode, use the CODE directive.
\end_layout

\begin_layout Subsection
Configuration
\end_layout

\begin_layout Standard
You can choose the fuse settings, also known as Configuration Bits, for
 your PIC implementation using the __CONFIG, __FUSES (alias for __CONFIG)
 and CONFIG directive, so that the hex file set the fuses explicitly.
 Naturally you should make sure that these settings match your PIC hardware
 design.
 CONFIG and __CONFIG (or__FUSES) directives cannot both be used in the same
 project.
 __CONFIG and __FUSES directives are deprecated for 16-bit PIC MCU devices
 (PIC18FXXX), CONFIG directive should be used instead if in the command
 line is included the "–mpasm-compatible" option.
 Otherwise in the 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if in the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option) these directives are deprecated
 for 
\emph on
all
\emph default
 PIC MCU devices.
\end_layout

\begin_layout Standard
In the 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option), in the case of each processor
 (PIC12XXX, PIC14XXX, PIC18XXX) it is possible to use the CONFIG directive.
\end_layout

\begin_layout Standard
The __MAXRAM and __BADRAM directives specify which RAM locations are legal.
 These directives are mostly used in processor-specific configuration files.
\end_layout

\begin_layout Subsection
Conditional assembly
\end_layout

\begin_layout Standard
The IF, IFNDEF, IFDEF, ELIF, ELIFNDEF, ELIFDEF, ELSE and ENDIF directives
 enable you to assemble certain sections of code only if a condition is
 met.
 In themselves, they do not cause gpasm to emit any PIC code.
 The example in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:macros"

\end_inset

 for demonstrates conditional assembly.
\end_layout

\begin_layout Subsection
Macros
\end_layout

\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
name "sec:macros"

\end_inset

gpasm supports a simple macro scheme; you can define and use macros like
 this:
\end_layout

\begin_layout LyX-Code
any     macro parm
\begin_inset Newline newline
\end_inset

        movlw parm
\begin_inset Newline newline
\end_inset

        endm
\begin_inset Newline newline
\end_inset

...
\begin_inset Newline newline
\end_inset

        any   33
\end_layout

\begin_layout Standard
A more useful example of some macros in use is:
\end_layout

\begin_layout LyX-Code
; Shift reg left
\begin_inset Newline newline
\end_inset

slf     macro   reg
\begin_inset Newline newline
\end_inset

        clrc
\begin_inset Newline newline
\end_inset

        rlf     reg,f
\begin_inset Newline newline
\end_inset

endm
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout LyX-Code
; Scale W by 
\begin_inset Quotes eld
\end_inset

factor
\begin_inset Quotes erd
\end_inset

.
  Result in 
\begin_inset Quotes eld
\end_inset

reg
\begin_inset Quotes erd
\end_inset

, W unchanged.
\end_layout

\begin_layout LyX-Code
scale   macro   reg, factor
\begin_inset Newline newline
\end_inset

        if (factor == 1)
\begin_inset Newline newline
\end_inset

            movwf reg                 ; 1 X is easy
\begin_inset Newline newline
\end_inset

        else
\begin_inset Newline newline
\end_inset

            scale   reg, (factor / 2) ; W * (factor / 2)
\begin_inset Newline newline
\end_inset

            slf     reg,f             ; double reg
\begin_inset Newline newline
\end_inset

            if ((factor & 1) == 1)    ; if lo-bit set ..
\begin_inset Newline newline
\end_inset

                addwf   reg,f         ; ..
 add W to reg
\begin_inset Newline newline
\end_inset

            endif
\begin_inset Newline newline
\end_inset

        endif
\begin_inset Newline newline
\end_inset

endm
\end_layout

\begin_layout Standard
This recursive macro generates code to multiply W by a constant 
\begin_inset Quotes eld
\end_inset

factor
\begin_inset Quotes erd
\end_inset

, and stores the result in 
\begin_inset Quotes eld
\end_inset

reg
\begin_inset Quotes erd
\end_inset

.
 So writing:
\end_layout

\begin_layout LyX-Code
        scale   tmp,D'10'
\end_layout

\begin_layout Standard
is the same as writing:
\end_layout

\begin_layout LyX-Code
        movwf   tmp      ; tmp = W
\begin_inset Newline newline
\end_inset

        clrc
\begin_inset Newline newline
\end_inset

        rlf     tmp,f    ; tmp = 2 * W
\begin_inset Newline newline
\end_inset

        clrc
\begin_inset Newline newline
\end_inset

        rlf     tmp,f    ; tmp = 4 * W
\begin_inset Newline newline
\end_inset

        addwf   tmp,f    ; tmp = (4 * W) + W = 5 * W
\begin_inset Newline newline
\end_inset

        clrc
\begin_inset Newline newline
\end_inset

        rlf     tmp,f    ; tmp = 10 * W
\end_layout

\begin_layout Standard
It is possible to define symbols local to a macro using the 
\family typewriter
local
\family default
 directive, as shown in the 
\family typewriter
spin2
\family default
 macro below:
\end_layout

\begin_layout LyX-Code
spin    macro   n
\begin_inset Newline newline
\end_inset

        movlw   n
\begin_inset Newline newline
\end_inset

        addlw   0xff
\begin_inset Newline newline
\end_inset

        btfss   STATUS,Z
\begin_inset Newline newline
\end_inset

        goto    $-2
\begin_inset Newline newline
\end_inset

        endm
\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset

spin2   macro   a,b
\begin_inset Newline newline
\end_inset

        local   s2s
\begin_inset Newline newline
\end_inset

        movlw   a
\begin_inset Newline newline
\end_inset

        movwf   spinreg
\begin_inset Newline newline
\end_inset

s2s     spin    b
\begin_inset Newline newline
\end_inset

        decfsz  spinreg,f
\begin_inset Newline newline
\end_inset

        goto    s2s
\begin_inset Newline newline
\end_inset

        endm 
\end_layout

\begin_layout Subsection
$
\end_layout

\begin_layout Standard
$ expands to the address of the instruction currently being assembled.
 If it's used in a context other than an instruction, such as a conditional,
 it expands to the address the next instruction would occupy, since the
 assembler's idea of current address is incremented after an instruction
 is assembled.
 $ may be manipulated just like any other number:
\end_layout

\begin_layout LyX-Code
$
\begin_inset Newline newline
\end_inset

$ + 1
\begin_inset Newline newline
\end_inset

$ - 2
\end_layout

\begin_layout Standard
and can be used as a shortcut for writing loops without labels.
\end_layout

\begin_layout LyX-Code
LOOP:  BTFSS flag,0x00
\begin_inset Newline newline
\end_inset

       GOTO LOOP
\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset

       BTFSS flag,0x00
\begin_inset Newline newline
\end_inset

       GOTO  $ - 1
\end_layout

\begin_layout Subsection
Suggestions for structuring your code
\end_layout

\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
name "sec:structuring"

\end_inset

Nested IF operations can quickly become confusing.
 Indentation is one way of making code clearer.
 Another way is to add braces on IF, ELSE and ENDIF, like this:
\end_layout

\begin_layout LyX-Code
        IF (this) ; {
\begin_inset Newline newline
\end_inset

          ...
\begin_inset Newline newline
\end_inset

        ELSE      ; }{
\begin_inset Newline newline
\end_inset

          ...
\begin_inset Newline newline
\end_inset

        ENDIF     ; }
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
        IF (this) ; {
\begin_inset Newline newline
\end_inset

          ...
\begin_inset Newline newline
\end_inset

        ELIF      ; }{
\begin_inset Newline newline
\end_inset

          ...
\begin_inset Newline newline
\end_inset

        ELSE      ; }{
\begin_inset Newline newline
\end_inset

          ...
\begin_inset Newline newline
\end_inset

        ENDIF     ; }
\end_layout

\begin_layout Standard
After you've done this, you can use your text editor's show-matching-brace
 to check matching parts of the IF structure.
 In vi this command is 
\begin_inset Quotes eld
\end_inset

%
\begin_inset Quotes erd
\end_inset

, in emacs it's M-C-f and M-C-b.
\end_layout

\begin_layout Subsection
Directive summary
\begin_inset CommandInset label
LatexCommand label
name "sec:directivesummary"

\end_inset


\end_layout

\begin_layout Subsection*
__BADRAM
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

BADRAM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
__BADRAM <expression> [, <expression>]*
\end_layout

\begin_layout Standard
Instructs gpasm that it should generate an error if there is any use of
 the given RAM locations.
 Specify a range of addresses with <lo>-<hi>.
 See any processor-specific header file for an example.
\end_layout

\begin_layout Standard
See also: __MAXRAM
\end_layout

\begin_layout Subsection*
__BADROM
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

BADROM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
__BADROM <expression> [, <expression>]*
\end_layout

\begin_layout Standard
Instructs gpasm that it should generate an error if there is any use of
 the given ROM locations.
 Specify a range of addresses with <lo>-<hi>.
 See any processor-specific header file for an example.
\end_layout

\begin_layout Standard
See also: __MAXROM
\end_layout

\begin_layout Subsection*
__CONFIG
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

CONFIG
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
__CONFIG <expression>
\end_layout

\begin_layout Standard
Sets the PIC processor's configuration fuses.
\end_layout

\begin_layout Standard
See also: CONFIG, __FUSES
\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset

NOTE: __CONFIG and __FUSES directives are deprecated for 16-bit PIC MCU
 devices (PIC18FXXX), CONFIG directive should be used instead if in the
 command line is included the "–mpasm-compatible" option.
\end_layout

\begin_layout Standard
Otherwise in the 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if in the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option) these directives are deprecated
 for 
\emph on
all
\emph default
 PIC MCU devices.
\end_layout

\begin_layout Subsection*
__FUSES
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

FUSES
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
__FUSES <expression>
\end_layout

\begin_layout Standard
Alias for __CONFIG.
 Sets the PIC processor's configuration fuses
\end_layout

\begin_layout Standard
See also: CONFIG
\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset

NOTE: __CONFIG and __FUSES directives are deprecated for 16-bit PIC MCU
 devices (PIC18FXXX), CONFIG directive should be used instead if in the
 command line is included the "–mpasm-compatible" option.
\end_layout

\begin_layout Standard
Otherwise in the 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if in the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option) these directives are deprecated
 for 
\emph on
all
\emph default
 PIC MCU devices.
\end_layout

\begin_layout Subsection*
__IDLOCS
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

IDLOCS
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
__IDLOCS <expression> or __IDLOCS <expression1>,<expression2>
\end_layout

\begin_layout Standard
Sets the PIC processor's identification locations.
 For 12 and 14 bit processors, the four id locations are set to the hexadecimal
 value of expression.
 For 18cxx devices idlocation expression1 is set to the hexadecimal value
 of expression2.
\end_layout

\begin_layout Standard
See also: IDLOCS
\end_layout

\begin_layout Subsection*
__MAXRAM
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

MAXRAM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
__MAXRAM <expression>
\end_layout

\begin_layout Standard
Instructs gpasm that an attempt to use any RAM location above the one specified
 should be treated as an error.
 See any processor specific header file for an example.
\end_layout

\begin_layout Standard
See also: __BADRAM
\end_layout

\begin_layout Subsection*
__MAXROM
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

MAXROM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
__MAXROM <expression>
\end_layout

\begin_layout Standard
Instructs gpasm that an attempt to use any ROM location above the one specified
 should be treated as an error.
 See any processor specific header file for an example.
\end_layout

\begin_layout Standard
See also: __BADROM
\end_layout

\begin_layout Subsection*
ASSUME
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ASSUME
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ASSUME <label>
\end_layout

\begin_layout Standard
This is a helper directive for advanced users.
 It tells the compiler which bank will be the default.
 This directive does not create any code, rather helps eliminate the unnecessary
 and confusing bank warnings.
 Worth using is primarily in the absolute mode.
 This directive can not be used in 
\begin_inset Quotes eld
\end_inset

mpasm compatible
\begin_inset Quotes erd
\end_inset

 mode!
\end_layout

\begin_layout Subsection*
BANKISEL
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
BANKISEL
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
BANKISEL <label>
\end_layout

\begin_layout Standard
This directive generates bank selecting code for indirect access of the
 address specified by <label>.
 The directive is not available for all devices.
 It is only available for 14 bit and 16 bit devices.
 For 14 bit devices, the bank selecting code will set/clear the IRP bit
 of the STATUS register.
 It will use MOVLB or MOVLR in 16 bit devices.
\end_layout

\begin_layout Standard
See also: BANKSEL, PAGESEL
\end_layout

\begin_layout Subsection*
BANKSEL
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
BANKSEL
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
BANKSEL <label>
\end_layout

\begin_layout Standard
This directive generates bank selecting code to set the bank to the bank
 containing <label>.
 The bank selecting code will set/clear bits in the FSR for 12 bit devices.
 It will set/clear bits in the STATUS register for 14 bit devices.
 It will use MOVLB or MOVLR in 16 bit devices.
 MOVLB will be used for enhanced 16 bit devices.
\end_layout

\begin_layout Standard
See also: BANKISEL, PAGESEL
\end_layout

\begin_layout Subsection*
CONFIG
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
CONFIG
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
CONFIG <expression>[, <expression>]*
\end_layout

\begin_layout Standard
Sets configuration fuses only on 16-bit PIC MCU devices (PIC18FXXX) if the
 command line is included the "–mpasm-compatible" option.
\begin_inset Newline newline
\end_inset

In the 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if in the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option), in the case of each processor
 (PIC12XXX, PIC14XXX, PIC18XXX) it is possible to use this directive.
\end_layout

\begin_layout Standard
See also: __CONFIG
\end_layout

\begin_layout Subsection*
CBLOCK
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
CBLOCK
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
CBLOCK [<expression>]
\begin_inset Newline newline
\end_inset

       <label>[:<increment>][,<label>[:<increment>]]
\begin_inset Newline newline
\end_inset

ENDC
\end_layout

\begin_layout Standard
Marks the beginning of a block of constants <label>.
 gpasm allocates values for symbols in the block starting at the value <expressi
on> given to CBLOCK.
 An optional <increment> value leaves space after the <label> before the
 next <label>.
\end_layout

\begin_layout Standard
See also: EQU
\end_layout

\begin_layout Subsection*
CODE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
CODE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> CODE <expression>
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Creates a new machine code section in the output object file.
 <label> specifies the name of the section.
 If <label> is not specified the default name 
\begin_inset Quotes eld
\end_inset

.code
\begin_inset Quotes erd
\end_inset

 will be used.
 <expression> is optional and specifies the absolute address of the section.
 
\end_layout

\begin_layout Standard
See also: IDATA, UDATA, CODE_PACK
\end_layout

\begin_layout Subsection*
CODE_PACK
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
CODE
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
_
\end_layout

\end_inset

PACK
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> CODE_PACK <expression>
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Creates a new byte-packed machine code section in the output object file.
 <label> specifies the name of the section.
 If <label> is not specified the default name 
\begin_inset Quotes eld
\end_inset

.code
\begin_inset Quotes erd
\end_inset

 will be used.
 <expression> is optional and specifies the absolute address of the section.
 
\end_layout

\begin_layout Standard
See also: IDATA, UDATA, CODE
\end_layout

\begin_layout Subsection*
CONSTANT
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
CONSTANT
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
CONSTANT <label>=<expression> [, <label>=<expression>]*
\end_layout

\begin_layout Standard
Permanently assigns the value obtained by evaluating <expression> to thesymbol
 <label>.
 Similar to SET and VARIABLE, except it can not be changed if once assigned.
\end_layout

\begin_layout Standard
(The default value is 0.) See also: EQU, SET, VARIABLE
\end_layout

\begin_layout Subsection*
DA
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
DA
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> DA <expression> [, <expression]*
\end_layout

\begin_layout Standard
Stores Strings in program memory.
 The data is stored as one 14 bit word representing two 7 bit ASCII characters.
\end_layout

\begin_layout Standard
See also: DT
\end_layout

\begin_layout Subsection*
DATA
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
DATA
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
DATA <expression> [, <expression]*
\end_layout

\begin_layout Standard
Generates the specified data.
\end_layout

\begin_layout Standard
See also: DA, DB, DE, DW
\end_layout

\begin_layout Subsection*
DB
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
DB
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> DB <expression> [, <expression]*
\end_layout

\begin_layout Standard
Declare data of one byte.
 The values are packed two per word.
\end_layout

\begin_layout Standard
See also: DA, DATA, DE, DW
\end_layout

\begin_layout Subsection*
DE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
DE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> DE <expression> [, <expression]*
\end_layout

\begin_layout Standard
Define EEPROM data.
 Each character in a string is stored in a separate word.
\end_layout

\begin_layout Standard
See also: DA, DATA, DB, DW
\end_layout

\begin_layout Subsection*
DT
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
DT
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
DT <expression> [, <expression]*
\end_layout

\begin_layout Standard
Generates the specified data as bytes in a sequence of RETLW instructions.
\end_layout

\begin_layout Standard
See also: DATA
\end_layout

\begin_layout Subsection*
DW
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
DW
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> DW <expression> [, <expression]*
\end_layout

\begin_layout Standard
Declare data of one word.
\end_layout

\begin_layout Standard
See also: DA, DATA, DB, DW
\end_layout

\begin_layout Subsection*
ELIF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ELIF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ELIF <expression>
\end_layout

\begin_layout Standard
A conditional assembly block after an IF...
 or ELIF...
 statement.
 If the value obtained by evaluating <expression> is true (i.e.
 non-zero), code up to the following ELIF..., ELSE or ENDIF is assembled.
 If the value is false (i.e.
 zero), code is not assembled until the corresponding ELIF..., ELSE or ENDIF.
 This directive can not be used in 
\begin_inset Quotes eld
\end_inset

mpasm compatible
\begin_inset Quotes erd
\end_inset

 mode!
\end_layout

\begin_layout Standard
See also: IF, IFDEF, IFNDEF, ELIFDEF, ELIFNDEF, ELSE, ENDIF
\end_layout

\begin_layout Subsection*
ELIFDEF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ELIFDEF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ELIFDEF <symbol>
\end_layout

\begin_layout Standard
A conditional assembly block after an IF...
 or ELIF...
 statement.
 If <symbol> appears in the symbol table, gpasm assembles the following
 code.
 This directive can not be used in 
\begin_inset Quotes eld
\end_inset

mpasm compatible
\begin_inset Quotes erd
\end_inset

 mode!
\end_layout

\begin_layout Standard
See also: IF, IFDEF, IFNDEF, ELIF, ELIFNDEF, ELSE, ENDIF
\end_layout

\begin_layout Subsection*
ELIFNDEF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ELIFNDEF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ELIFNDEF <symbol>
\end_layout

\begin_layout Standard
A conditional assembly block after an IF...
 or ELIF...
 statement.
 If <symbol>does not appear in the symbol table, gpasm assembles the following
 code.
 This directive can not be used in 
\begin_inset Quotes eld
\end_inset

mpasm compatible
\begin_inset Quotes erd
\end_inset

 mode!
\end_layout

\begin_layout Standard
See also: IF, IFDEF, IFNDEF, ELIF, ELIFDEF, ELSE, ENDIF
\end_layout

\begin_layout Subsection*
ELSE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ELSE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ELSE
\end_layout

\begin_layout Standard
Marks the alternate section of a conditional assembly block.
\end_layout

\begin_layout Standard
See also: IF, IFDEF, IFNDEF, ELIF, ELIFDEF, ELIFNDEF, ENDIF
\end_layout

\begin_layout Subsection*
END
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
END
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
END
\end_layout

\begin_layout Standard
Marks the end of the source file.
\end_layout

\begin_layout Subsection*
ENDC
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ENDC
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ENDC
\end_layout

\begin_layout Standard
Marks the end of a CBLOCK.
\end_layout

\begin_layout Standard
See also: CBLOCK
\end_layout

\begin_layout Subsection*
ENDIF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ENDIF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ENDIF
\end_layout

\begin_layout Standard
Ends a conditional assembly block.
\end_layout

\begin_layout Standard
See also: IF, IFDEF, IFNDEF, ELIF, ELIFDEF, ELIFNDEF, ELSE
\end_layout

\begin_layout Subsection*
ENDM
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ENDM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ENDM
\end_layout

\begin_layout Standard
Ends a macro definition.
\end_layout

\begin_layout Standard
See also: MACRO
\end_layout

\begin_layout Subsection*
ENDW
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ENDW
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ENDW
\end_layout

\begin_layout Standard
Ends a while loop.
\end_layout

\begin_layout Standard
See also: WHILE
\end_layout

\begin_layout Subsection*
EQU
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
EQU
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> EQU <expression>
\end_layout

\begin_layout Standard
Permanently assigns the value obtained by evaluating <expression> to the
 symbol <label>.
 Similar to SET and VARIABLE, except it can not be changed if once assigned.
\end_layout

\begin_layout Standard
(The default value is 0.) See also: CONSTANT, SET
\end_layout

\begin_layout Subsection*
ERROR
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ERROR
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ERROR <string>
\end_layout

\begin_layout Standard
Issues an error message.
 The directive - inside of the parameter string - recognize and execute
 the #v() macro.
\end_layout

\begin_layout Standard
See also: MESSG
\end_layout

\begin_layout Subsection*
ERRORLEVEL
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ERRORLEVEL
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ERRORLEVEL {0 | 1 | 2 | +<msgnum> | +<msgnum0-msgnum1> | -<msgnum> | -<msgnum0-m
sgnum1>}[, ...]
\end_layout

\begin_layout Standard
Sets the types of messages that are printed.
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="3">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Setting
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affect
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Comment
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Messages, warnings and errors printed.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Warnings and error printed.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Errors printed.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-<msgnum>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Inhibits the printing of message <msgnum>.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-<msgnum0-msgnum1>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Inhibits the printing of messages from <msgnum0> to <msgnum1>.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
This can not be used in 
\begin_inset Quotes eld
\end_inset

mpasm compatible
\begin_inset Quotes erd
\end_inset

 mode!
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+<msgnum>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enables the printing of message <msgnum>.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+<msgnum0-msgnum1>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enables the printing of messages from <msgnum0> to <msgnum1>.
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
This can not be used in 
\begin_inset Quotes eld
\end_inset

mpasm compatible
\begin_inset Quotes erd
\end_inset

 mode!
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
See also: LIST
\end_layout

\begin_layout Subsection*
EXTERN
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
EXTERN
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
EXTERN <symbol> [ , <symbol> ]*
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Delcare a new symbol that is defined in another object file.
\end_layout

\begin_layout Standard
See also: GLOBAL
\end_layout

\begin_layout Subsection*
EXITM
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
EXITM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
EXITM
\end_layout

\begin_layout Standard
Immediately return from macro expansion during assembly.
\end_layout

\begin_layout Standard
See also: ENDM
\end_layout

\begin_layout Subsection*
EXPAND
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
EXITM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
EXPAND
\end_layout

\begin_layout Standard
Expand the macro in the listing file.
\end_layout

\begin_layout Standard
See also: ENDM
\end_layout

\begin_layout Subsection*
FILL
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
FILL
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> FILL <expression>,<count>
\end_layout

\begin_layout Standard
Generates <count> occurrences of the program word or byte <expression>.
 If expression is enclosed by parentheses, expression is a line of assembly.
 
\end_layout

\begin_layout Standard
See also: DATA DW ORG
\end_layout

\begin_layout Subsection*
GLOBAL
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
GLOBAL
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
GLOBAL <symbol> [ , <symbol> ]*
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Delcare a symbol as global.
\end_layout

\begin_layout Standard
See also: GLOBAL
\end_layout

\begin_layout Subsection*
IDATA
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
IDATA
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> IDATA <expression>
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Creates a new initialized data section in the output object file.
 <label> specifies the name of the section.
 If <label> is not specified the default name 
\begin_inset Quotes eld
\end_inset

.idata
\begin_inset Quotes erd
\end_inset

 will be used.
 <expression> is optional and specifies the absolute address of the section.
 Data memory is allocated and the initialization data is placed in ROM.
 The user must provide the code to load the data into memory.
 
\end_layout

\begin_layout Standard
See also: CODE, UDATA
\end_layout

\begin_layout Subsection*
IDLOCS
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
IDLOCS
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
IDLOCS <expression> or IDLOCS <expression1>,<expression2>
\end_layout

\begin_layout Standard
In 
\begin_inset Quotes eld
\end_inset

gpasm
\begin_inset Quotes erd
\end_inset

 mode (if the command line is 
\emph on
not
\emph default
 included the "–mpasm-compatible" option), in the case of PIC18FXXX processors
 it is possible to use this directive.
\end_layout

\begin_layout Standard
The expressions may be are as follows: string (
\begin_inset Quotes eld
\end_inset

abcdef
\begin_inset Quotes erd
\end_inset

), character ('a'), constant (0x37), symbol (NUM1)
\end_layout

\begin_layout Standard
These may be used simultaneously: IDLOCS
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset Quotes eld
\end_inset

abcd
\begin_inset Quotes erd
\end_inset

, 0x76, 'D', NUM1
\end_layout

\begin_layout Standard
The length of IDLOCS can be at most 8 bytes.
\end_layout

\begin_layout Standard
See also: CONFIG, __IDLOCS
\end_layout

\begin_layout Subsection*
IF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
IF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
IF <expression>
\end_layout

\begin_layout Standard
Begin a conditional assembly block.
 If the value obtained by evaluating <expression> is true (i.e.
 non-zero), code up to the following ELSE or ENDIF is assembled.
 If the value is false (i.e.
 zero), code is not assembled until the corresponding ELSE or ENDIF.
\end_layout

\begin_layout Standard
See also: IFDEF, IFNDEF, ELIF, ELIFDEF, ELIFNDEF, ELSE, ENDIF
\end_layout

\begin_layout Subsection*
IFDEF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
IFDEF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
IFDEF <symbol>
\end_layout

\begin_layout Standard
Begin a conditional assembly block.
 If <symbol> appears in the symbol table, gpasm assembles the following
 code.
\end_layout

\begin_layout Standard
See also: IF, IFNDEF, ELIF, ELIFDEF, ELIFNDEF, ELSE, ENDIF
\end_layout

\begin_layout Subsection*
IFNDEF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
IFNDEF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
IFNDEF <symbol>
\end_layout

\begin_layout Standard
Begin a conditional assembly block.
 If <symbol>does not appear in the symbol table, gpasm assembles the following
 code.
\end_layout

\begin_layout Standard
See also: IF, IFDEF, ELIF, ELIFDEF, ELIFNDEF, ELSE, ENDIF
\end_layout

\begin_layout Subsection*
LIST
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
LIST
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
LIST <expression> [ , <expression> ] *
\end_layout

\begin_layout Standard
Enables output to the list (
\begin_inset Quotes eld
\end_inset

.lst
\begin_inset Quotes erd
\end_inset

) file.
 All arguments are interpreted as decimal regardless of the current radix
 setting.
 
\begin_inset Quotes eld
\end_inset

list n=0
\begin_inset Quotes erd
\end_inset

 may be used to prevent page breaks in the code section of the list file.
 Other options are listed in the table below:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="11" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
b=nnn
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the tab spaces
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
f=<format>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set the hex file format.
 Can be inhx8m, inhx8s, inhx16, or inhx32.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
m=<expression>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set the maximum ROM address.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mm=[ON|OFF]
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Memory Map on or off
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
n=nnn
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the number of lines per page
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
p = <symbol>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the current processor
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pe = <symbol>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the current processor and enables the 18xx extended mode 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
r= [ oct | dec | hex ]
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the radix
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
st = [ ON | OFF ]
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Symbol table dump on or off
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
w=[0 | 1| 2]
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the message level.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
See also: NOLIST, RADIX, PROCESSOR
\end_layout

\begin_layout Subsection*
LOCAL
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
LOCAL
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
LOCAL <symbol>[[=<expression>], [<symbol>[=<expression>]]*]
\end_layout

\begin_layout Standard
Declares <symbol> as local to the macro that's currently being defined.
 This means that further occurrences of <symbol> in the macro definition
 refer to a local variable, with scope and lifetime limited to the execution
 of the macro.
\end_layout

\begin_layout Standard
See also: MACRO, ENDM
\end_layout

\begin_layout Subsection*
MACRO
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
MACRO
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> MACRO [ <symbol> [ , <symbol> ]* ]
\end_layout

\begin_layout Standard
Declares a macro with name <label>.
 gpasm replaces any occurrences of <symbol> in the macro definition with
 the parameters given at macro invocation.
\end_layout

\begin_layout Standard
See also: LOCAL, ENDM
\end_layout

\begin_layout Subsection*
MESSG
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
MESSG
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
MESSG <string>
\end_layout

\begin_layout Standard
Writes <string> to the list file, and to the standard error output.
 The directive - inside of the parameter string - recognize and execute
 the #v() macro.
\end_layout

\begin_layout Standard
See also: ERROR
\end_layout

\begin_layout Subsection*
NOEXPAND
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
NOEXPAND
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
NOEXPAND
\end_layout

\begin_layout Standard
Turn off macro expansion in the list file.
\end_layout

\begin_layout Standard
See also: EXPAND
\end_layout

\begin_layout Subsection*
NOLIST
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
NOLIST
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
NOLIST
\end_layout

\begin_layout Standard
Disables list file output.
\end_layout

\begin_layout Standard
See also: LIST
\end_layout

\begin_layout Subsection*
ORG
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ORG
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
ORG <expression>
\end_layout

\begin_layout Standard
Sets the location at which instructions will be placed.
 If the source file does not specify an address with ORG, gpasm assumes
 an ORG of zero.
\end_layout

\begin_layout Subsection*
PAGE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
PAGE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
PAGE
\end_layout

\begin_layout Standard
Causes the list file to advance to the next page.
\end_layout

\begin_layout Standard
See also: LIST
\end_layout

\begin_layout Subsection*
PAGESEL
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
PAGESEL
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
PAGESEL <label>
\end_layout

\begin_layout Standard
This directive will generate page selecting code to set the page bits to
 the page containing the designated <label>.
 The page selecting code will set/clear bits in the STATUS for 12 bit and
 14 bit devices.
 For 16 bit devices, it will generate MOVLW and MOVWF to modify PCLATH.
 The directive is ignored for enhanced 16 bit devices.
\end_layout

\begin_layout Standard
See also: BANKISEL, BANKSEL, PAGESELW
\end_layout

\begin_layout Subsection*
PAGESELW
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
PAGESELW
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
PAGESELW <label>
\end_layout

\begin_layout Standard
This directive will generate page selecting code to set the page bits to
 the page containing the designated <label>.
 The page selecting code will generate MOVLW and MOVWF to modify PCLATH.
 The directive is ignored for enhanced 16 bit devices.
\end_layout

\begin_layout Standard
See also: BANKISEL, BANKSEL, PAGESEL
\end_layout

\begin_layout Subsection*
PROCESSOR
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
PROCESSOR
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
PROCESSOR <symbol>
\end_layout

\begin_layout Standard
Selects the target processor.
 See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Supported-processors"

\end_inset

 for more details.
\end_layout

\begin_layout Standard
See also: LIST
\end_layout

\begin_layout Subsection*
RADIX
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
RADIX
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
RADIX <symbol>
\end_layout

\begin_layout Standard
Selects the default radix from 
\begin_inset Quotes eld
\end_inset

oct
\begin_inset Quotes erd
\end_inset

 for octal, 
\begin_inset Quotes eld
\end_inset

dec
\begin_inset Quotes erd
\end_inset

 for decimal or 
\begin_inset Quotes eld
\end_inset

hex
\begin_inset Quotes erd
\end_inset

 for hexadecimal.
 gpasm uses this radix to interpret numbers that don't have an explicit
 radix.
\end_layout

\begin_layout Standard
See also: LIST
\end_layout

\begin_layout Subsection*
RES
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
RES
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
RES <mem_units>
\end_layout

\begin_layout Standard
Causes the memory location pointer to be advanced <mem_units>.
 Can be used to reserve data storage.
\end_layout

\begin_layout Standard
See also: FILL, ORG
\end_layout

\begin_layout Subsection*
SET
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
SET
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> SET <expression>
\end_layout

\begin_layout Standard
Temporarily assigns the value obtained by evaluating <expression> to the
 symbol <label>.
\end_layout

\begin_layout Standard
(The default value is 0.) See also: CONSTANT, EQU, VARIABLE
\end_layout

\begin_layout Subsection*
SPACE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
SPACE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
SPACE <expression>
\end_layout

\begin_layout Standard
Inserts <expression> number of blank lines into the listing file.
\end_layout

\begin_layout Standard
See also: LIST
\end_layout

\begin_layout Subsection*
SUBTITLE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
SUBTITLE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
SUBTITLE <string>
\end_layout

\begin_layout Standard
This directive establishes a second program header line for use as a subtitle
 in the listing output.
 <string> is an ASCII string enclosed by double quotes, no longer than 60
 characters.
\end_layout

\begin_layout Standard
See also: TITLE
\end_layout

\begin_layout Subsection*
TITLE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
TITLE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
TITLE <string>
\end_layout

\begin_layout Standard
This directive establishes a program header line for use as a title in the
 listing output.
 <string> is an ASCII string enclosed by double quotes, no longer than 60
 characters.
\end_layout

\begin_layout Standard
See also: SUBTITLE
\end_layout

\begin_layout Subsection*
UDATA
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
UDATA
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> UDATA <expression>
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Creates a new uninitialized data section in the output object file.
 <label> specifies the name of the section.
 If <label> is not specified the default name 
\begin_inset Quotes eld
\end_inset

.udata
\begin_inset Quotes erd
\end_inset

 will be used.
 <expression> is optional and specifies the absolute address of the section.
 
\end_layout

\begin_layout Standard
See also: CODE, IDATA, UDATA_ACS, UDATA_OVR, UDATA_SHR
\end_layout

\begin_layout Subsection*
UDATA_ACS
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
UDATA ACS
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> UDATA_ACS <expression>
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Creates a new uninitialized accessbank data section in the output object
 file.
 <label> specifies the name of the section.
 If <label> is not specified the default name 
\begin_inset Quotes eld
\end_inset

.udata_acs
\begin_inset Quotes erd
\end_inset

 will be used.
 <expression> is optional and specifies the absolute address of the section.
 
\end_layout

\begin_layout Standard
See also: CODE, IDATA, UDATA
\end_layout

\begin_layout Subsection*
UDATA_OVR
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
UDATA OVR
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> UDATA_OVR <expression>
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Creates a new uninitialized overlaid data section in the output object
 file.
 <label> specifies the name of the section.
 If <label> is not specified the default name 
\begin_inset Quotes eld
\end_inset

.udata_ovr
\begin_inset Quotes erd
\end_inset

 will be used.
 <expression> is optional and specifies the absolute address of the section.
 
\end_layout

\begin_layout Standard
See also: CODE, IDATA, UDATA
\end_layout

\begin_layout Subsection*
UDATA_SHR
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
UDATA SHR
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
<label> UDATA_SHR <expression>
\end_layout

\begin_layout Standard
Only for relocatable mode.
 Creates a new uninitialized sharebank data section in the output object
 file.
 <label> specifies the name of the section.
 If <label> is not specified the default name 
\begin_inset Quotes eld
\end_inset

.udata_shr
\begin_inset Quotes erd
\end_inset

 will be used.
 <expression> is optional and specifies the absolute address of the section.
 
\end_layout

\begin_layout Standard
See also: CODE, IDATA, UDATA
\end_layout

\begin_layout Subsection*
VARIABLE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
VARIABLE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
VARIABLE <label>[=<expression>, <label>[=<expression>]]*
\end_layout

\begin_layout Standard
Declares variable with the name <label>.
 The value of <label> may later be reassigned.
 The value of <label> does not have to be assigned at declaration.
\end_layout

\begin_layout Standard
(The default value is 0.) See also: CONSTANT
\end_layout

\begin_layout Subsection*
WHILE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
WHILE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
WHILE <expression>
\end_layout

\begin_layout Standard
Performs loop while <expression> is true.
\end_layout

\begin_layout Standard
See also: ENDW
\end_layout

\begin_layout Subsection
High level extensions
\end_layout

\begin_layout Standard
gpasm supports several directives for use with high level languages.
 These directives are easily identified because they start with 
\begin_inset Quotes eld
\end_inset

.
\begin_inset Quotes erd
\end_inset

.
 They are only available in relocatable mode.
\end_layout

\begin_layout Standard
These features are advanced and require knowledge of how gputils relocatable
 objects work.
 These features are intended to be used by compilers.
 Nothing prevents them from being used with assembly.
\end_layout

\begin_layout Subsection*
.DEF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.DEF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.DEF <symbol> [, <expression> ]*
\end_layout

\begin_layout Standard
Create a new COFF <symbol>.
 Options are listed in the table below:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="10" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
absolute
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Absolute symbol keyword.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
class=nnn
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the symbol class (byte sized).
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
debug
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Debug symbol keyword.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
extern
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
External symbol keyword.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
global
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Global symbol keyword.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
size=nnn
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Reserve words or bytes for the symbol.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
static
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Static Symbol keyword.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
type=nnn
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the symbol type (short sized).
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
value=nnn
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sets the symbol value.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
This directive gives the user good control of the symbol table.
 This control is necessary, but if used incorrectly it can have many undesirable
 consequences.
 It can easily cause errors during linking or invalid machine code.
 The user must fully understand the operation of gputils COFF symbol table
 before modifying its contents.
\end_layout

\begin_layout Standard
For best results, only one of the single keywords should be used.
 The keyword should follow the symbol name.
 The keyword should then be followed by any expressions that directly set
 the values.
 Here is an example:
\end_layout

\begin_layout Standard
.def global_clock, global, type = T_ULONG, size = 4
\end_layout

\begin_layout Standard
See also: .DIM
\end_layout

\begin_layout Subsection*
.DIM
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.DIM
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.DIM <symbol>, <number>, <expression> [, <expression> ] *
\end_layout

\begin_layout Standard
Create <number> auxiliary symbols, attached to <symbol>.
 Fill the auxilary symbols with the values specified in <expression>.
 The expressions must result in byte sized values when evaluated or be strings.
 The symbol must be a COFF symbol.
\end_layout

\begin_layout Standard
This directive will generate an error if the symbol already has auxiliary
 symbols.
 This prevents the user from corrupting automatically generated symbols.
\end_layout

\begin_layout Standard
Each auxiliary symbol is 18 bytes for Microchip COFF version 1 or 20 bytes
 for Microchip COFF version 2.
 If the byte size of contents specified by the expressions is greater then
 symbol size, several auxiliary symbols are generated.
 The last auxiliary symbol is zero byte padded to the auxiliary symbol length.
\end_layout

\begin_layout Standard
gpasm does not use auxilary symbols.
 So the contents have no effect on its operation.
 However, the contents may be used by gplink or a third party tool.
\end_layout

\begin_layout Standard
See also: .DEF
\end_layout

\begin_layout Subsection*
.DIRECT
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.DIRECT
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.DIRECT <command>, <string>
\end_layout

\begin_layout Standard
Provides a mechanism for direct communication from the program to the debugging
 environment.
 This method has no impact on the executable.
 The symbols will appear in both the COFF files and the COD files.
\end_layout

\begin_layout Standard
Each directive creates a new COFF symbol 
\begin_inset Quotes eld
\end_inset

.direct
\begin_inset Quotes erd
\end_inset

.
 An auxilary symbol is attached that contains <command> and <string>.
 The string must be less than 256 bytes.
 The command must have a value 0 to 255.
 There are no restrictions on the content, however these messages must conform
 to the debugging environment.
 The directive - inside of the <string> - recognize and execute the #v()
 macro.
 The typical values are summarized in the table below:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="9" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ASCII command
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
a
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
User defined assert.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
A
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Assembler/Compiler defined assert.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
e
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
User defined emulator commands.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
E
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Assembler/Compiler defined emulator commands.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
f
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
User defined printf.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
F
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Assembler/Compiler defined printf.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
l
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
User defined log command.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
L
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Assembler/Compiler/Code verification generated log command.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
The symbols also contain the address where the message was inserted into
 the assembly.
 The symbols, with the final relocated addresses, are available in executable
 COFF.
 The symbols are also written to the COD file.
 They can be viewed using gpvc.
\end_layout

\begin_layout Standard
See also: .DEF, .DIM
\end_layout

\begin_layout Subsection*
.EOF
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.EOF
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.EOF
\end_layout

\begin_layout Standard
This directive causes an end of file symbol to be placed in the symbol table.
 Normally this symbol is automatically generated.
 This directive allows the user to manually generate the symbol.
 The directive is only processed if the 
\begin_inset Quotes eld
\end_inset

-g
\begin_inset Quotes erd
\end_inset

 command line option is used.
 When that option is used, the automatic symbol generation is disabled.
\end_layout

\begin_layout Standard
See also: .EOF, .FILE, .LINE
\end_layout

\begin_layout Subsection*
.FILE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.FILE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.FILE <string>
\end_layout

\begin_layout Standard
This directive causes a file symbol to be placed in the symbol table.
 Normally this symbol is automatically generated.
 This directive allows the user to manually generate the symbol.
 The directive is only processed if the 
\begin_inset Quotes eld
\end_inset

-g
\begin_inset Quotes erd
\end_inset

 command line option is used.
 When that option is used, the automatic symbol generation is disabled.
\end_layout

\begin_layout Standard
See also: .EOF, .FILE, .LINE
\end_layout

\begin_layout Subsection*
.IDENT
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.IDENT
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.IDENT <string>
\end_layout

\begin_layout Standard
Creates an .ident COFF symbol and appends an auxiliary symbol.
 The auxiliary symbol points to an entry in the string table.
 The entry contains <string>.
 It is an ASCII comment of any length.
 This symbol has no impact on the operation of gputils.
 It is commonly used to store compiler versions.
 
\end_layout

\begin_layout Standard
See also: .DEF, .DIM
\end_layout

\begin_layout Subsection*
.LINE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.LINE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.LINE <expression>
\end_layout

\begin_layout Standard
This directive causes and COFF line number to be generated.
 Normally they are automatically generated.
 This directive allows the user to manually generate the line numbers.
 The directive is only processed if the 
\begin_inset Quotes eld
\end_inset

-g
\begin_inset Quotes erd
\end_inset

 command line option is used.
 When that option is used, the automatic symbol generation is disabled.
 The <expression> is always evaluated as decimal regardless of the current
 radix setting.
\end_layout

\begin_layout Standard
See also: .EOF, .FILE, .LINE
\end_layout

\begin_layout Subsection*
.TYPE
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
.TYPE
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
.TYPE <symbol>, <expression>
\end_layout

\begin_layout Standard
This directive modifies the COFF type of an existing <symbol>.
 The symbol must be defined.
 The type must be 0 to 0xffff.
 Common types are defined in coff.inc.
 
\end_layout

\begin_layout Standard
COFF symbol types default to NULL in gpasm.
 Although the type has no impact linking or generating an executable, it
 does help in the debug environment.
\end_layout

\begin_layout Standard
See also: .DEF
\end_layout

\begin_layout Section
Instructions 
\end_layout

\begin_layout Subsection
Instruction set summary
\end_layout

\begin_layout Subsubsection
12 Bit Devices (PIC12C5XX)
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="35" columns="2">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Syntax
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ADDLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add immediate to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ADDWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add W to <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ANDLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
And W and literal, result in W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ANDWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
And W and <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BCF <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Clear <bit> of <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BSF <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set <bit> of <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BTFSC <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip next instruction if <bit> of <f> is clear
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BTFSS <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip next instruction if <bit> of <f> is set
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CALL <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Call subroutine
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write zero to <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRW
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write zero to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRWDT
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Reset watchdog timer
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
COMF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Complement <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
DECF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Decrement <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
DECFSZ <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Decrement <f>, result in <dst>, skip if zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
GOTO <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Go to <addr>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
INCF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Increment <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
INCFSZ <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Increment <f>, result in <dst>, skip if zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IORLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Or W and immediate
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IORWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Or W and <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move <f> to <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move literal to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWF <f>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move W to <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
NOP
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
No operation
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
OPTION
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Load W with immediate and return
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RLF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rotate <f> left, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RRF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rotate <f> right, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SLEEP
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enter sleep mode
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SUBWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Subtract W from <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SWAPF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Swap nibbles of <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
TRIS
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XORLW
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Xor W and immediate
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XORWF
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Xor W and <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection
12 Bit Devices Enhanced Instruction Set
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="2">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Syntax
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVLB <k>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move literal to BSR register
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETFIE
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Return from interrupt
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETURN
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Return, maintain W
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection
14 Bit Devices (PIC16CXX)
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="38" columns="2">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Syntax
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ADDLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add immediate to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ADDWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add W to <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ANDLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
And immediate to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ANDWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
And W and <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BCF <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Clear <bit> of <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BSF <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set <bit> of <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BTFSC <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip next instruction if <bit> of <f> is clear
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BTFSS <f>,<bit>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip next instruction if <bit> of <f> is set
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CALL <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Call subroutine
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write zero to <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRW
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Write zero to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRWDT
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Reset watchdog timer
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
COMF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Complement <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
DECF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Decrement <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
DECFSZ <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Decrement <f>, result in <dst>, skip if zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
GOTO <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Go to <addr>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
INCF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Increment <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
INCFSZ <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Increment <f>, result in <dst>, skip if zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IORLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Or W and immediate
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IORWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Or W and <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move <f> to <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move literal to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWF <f>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move W to <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
NOP
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
No operation
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
OPTION
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETFIE
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Return from interrupt
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETLW <imm8>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Load W with immediate and return
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETURN
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Return from subroutine
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RLF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rotate <f> left, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RRF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rotate <f> right, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SLEEP
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enter sleep mode
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SUBLW
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Subtract W from literal
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SUBWF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Subtract W from <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SWAPF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Swap nibbles of <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
TRIS
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XORLW
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Xor W and immediate
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XORWF
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Xor W and <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection
14 Bit Devices Enhanced Instruction Set
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="23" columns="2">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Syntax
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ADDFSR <n>, <k>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add Literal <k> to FSR<n>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ADDWFC <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add with Carry W and <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ASRF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Arithmetic Right Shift
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BRA <k>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Relative Branch 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BRW
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Relative Branch with W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CALLW
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Call Subroutine with W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
LSLF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Logical Left Shift
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
LSRF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Logical Right Shift
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVIW ++FSR<n>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move Indirect FSR<n> to W with preincrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVIW –FSR<n>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move Indirect FSR<n> to W with predecrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVIW FSR<n>++
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move Indirect FSR<n> to W with postincrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVIW FSR<n>–
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move Indirect FSR<n> to W with postdecrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVIW <k>[<n>] 
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move INDFn to W, Indexed Indirect
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWI ++FSR<n>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move W to Indirect FSR<n> with preincrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWI –FSR<n>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move W to Indirect FSR<n> with predecrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWI FSR<n>++
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move W to Indirect FSR<n> with postincrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWI FSR<n>–
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move W to Indirect FSR<n> with postdecrement
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWI <k>[<n>]
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move W to INDF<n>, Indexed Indirect
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVLB <k>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move literal to BSR
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVLP <k>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move literal to PCLATH
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RESET
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Software device Reset
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SUBWFB <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Subtract with Borrow W from <f>
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection
Ubicom Processors
\end_layout

\begin_layout Standard
For Ubicom (Scenix) processors, the assembler supports the following instruction
s, in addition to those listed under 
\begin_inset Quotes eld
\end_inset

12 Bit Devices
\begin_inset Quotes erd
\end_inset

 above.
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="11" columns="2">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Syntax
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BANK <imm3>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IREAD
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MODE <imm4>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVMW
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVWM
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PAGE <imm3>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETI
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETIW
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETP
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
RETURN
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection
Special Macros
\end_layout

\begin_layout Standard
There are also a number of standard additional macros.
 These macros are:
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="19" columns="2">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Syntax
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ADDCF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add carry to <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
B <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Branch
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BC <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Branch on carry
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BZ <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Branch on zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BNC <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Branch on no carry
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BNZ <addr>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Branch on not zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRC
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Clear carry
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
CLRZ
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Clear zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SETC
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set carry
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SETZ
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Set zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MOVFW <f>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Move file to W
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
NEGF <f>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Negate <f>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SKPC
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip on carry
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SKPZ 
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip on zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SKPNC
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip on no carry
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SKPNZ 
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Skip on not zero
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SUBCF <f>,<dst>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Subtract carry from <f>, result in <dst>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
TSTF <f>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Test <f>
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Section
Errors/Warnings/Messages
\end_layout

\begin_layout Standard
gpasm writes every error message to two locations:
\end_layout

\begin_layout Itemize
the standard error output
\end_layout

\begin_layout Itemize
the list file (
\begin_inset Quotes eld
\end_inset

.lst
\begin_inset Quotes erd
\end_inset

)
\end_layout

\begin_layout Standard
The format of error messages is:
\end_layout

\begin_layout LyX-Code
Error <src-file> <line> : <code> <description>
\end_layout

\begin_layout Standard
where:
\end_layout

\begin_layout Description
<src-file> is the source file where gpasm encountered the error
\end_layout

\begin_layout Description
<line> is the line number
\end_layout

\begin_layout Description
<code> is the 3-digit code for the error, given in the list below
\end_layout

\begin_layout Description
<description> is a short description of the error.
 In some cases this contains further information about the error.
\end_layout

\begin_layout Standard
Error messages are suitable for parsing by emacs' 
\begin_inset Quotes eld
\end_inset

compilation mode
\begin_inset Quotes erd
\end_inset

.
 This chapter lists the error messages that gpasm produces.
 
\end_layout

\begin_layout Subsection
Errors
\end_layout

\begin_layout Description
101 ERROR directive
\end_layout

\begin_layout Standard
A user-generated error.
 See the ERROR directive for more details.
\end_layout

\begin_layout Description
105 Cannot open file.
\end_layout

\begin_layout Description
106 String substitution too complex.
\end_layout

\begin_layout Description
108 Illegal character.
\end_layout

\begin_layout Standard
gpasm encountered an illegal character in a source file.
\end_layout

\begin_layout Description
109 Unmatched (
\end_layout

\begin_layout Description
110 Unmatched )
\end_layout

\begin_layout Description
113 Symbol not previously defined.
\end_layout

\begin_layout Standard
gpasm encountered an unrecognized symbol.
\end_layout

\begin_layout Description
114 Divide by zero.
\end_layout

\begin_layout Standard
gpasm encountered a divide by zero.
\end_layout

\begin_layout Description
115 Duplicate label or redefining symbol that cannot be redefined.
\end_layout

\begin_layout Description
116 Address label duplicated or different in second pass.
\end_layout

\begin_layout Standard
Label resolved to a different address on gpasm's second pass.
\end_layout

\begin_layout Description
117 Address wrapped around 0.
\end_layout

\begin_layout Description
118 Overwriting previous address contents.
\end_layout

\begin_layout Standard
gpasm was instructed to write different values into the same address.
\end_layout

\begin_layout Description
120 Call or jump not allowed at this address (must be in low half of page)
\end_layout

\begin_layout Standard
gpasm was instructed to write different values into the same address.
\end_layout

\begin_layout Description
121 Illegal label.
\end_layout

\begin_layout Standard
gpasm encountered an illegal label.
\end_layout

\begin_layout Description
123 Illegal directive (Not Valid for this processor).
\end_layout

\begin_layout Standard
The specified directive is not valid for this processor.
\end_layout

\begin_layout Description
124 Illegal Argument.
\end_layout

\begin_layout Standard
gpasm encountered an illegal argument in an expression.
 
\end_layout

\begin_layout Description
125 Illegal Condition.
\end_layout

\begin_layout Standard
An illegal condition like a missing ENDIF or ENDW has been encountered.
\end_layout

\begin_layout Description
126 Argument out of range.
\end_layout

\begin_layout Standard
The expression has an argument that was out of range.
\end_layout

\begin_layout Description
127 Too many arguments.
\end_layout

\begin_layout Standard
gpasm encountered an expression with too many arguments.
\end_layout

\begin_layout Description
128 Missing argument(s).
\end_layout

\begin_layout Standard
gpasm encountered an expression with at least one missing argument.
\end_layout

\begin_layout Description
129 Expected
\end_layout

\begin_layout Standard
Expected a certain type of argument.
 
\end_layout

\begin_layout Description
130 Processor type previously defined.
\end_layout

\begin_layout Standard
The processor is being redefined.
 
\end_layout

\begin_layout Description
131 Processor type is undefined.
\end_layout

\begin_layout Standard
The processor type has not been defined.
 
\end_layout

\begin_layout Description
132 Unknown processor.
\end_layout

\begin_layout Standard
The selected processor is not valid.
 Check the processors listed in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Supported-processors"

\end_inset

.
\end_layout

\begin_layout Description
133 Hex file format INHX32 required.
\end_layout

\begin_layout Standard
An address above 32K was specified.
 
\end_layout

\begin_layout Description
135 Macro name missing.
\end_layout

\begin_layout Standard
A macro was defined without a name.
 
\end_layout

\begin_layout Description
136 Duplicate macro name.
\end_layout

\begin_layout Standard
A macro name was duplicated.
 
\end_layout

\begin_layout Description
140 WHILE must terminate within 256 iterations.
\end_layout

\begin_layout Standard
gpasm encountered an infinite loop or a loop with too many iterations (more
 than 256).
 
\end_layout

\begin_layout Description
143 Illegal nesting.
\end_layout

\begin_layout Description
145 Unmatched ENDM.
\end_layout

\begin_layout Standard
ENDM found without a macro definition.
 
\end_layout

\begin_layout Description
149 Directive only allowed when generating an object file.
\end_layout

\begin_layout Standard
Attempt to use relocatable-mode directive when generating HEX file directly.
 
\end_layout

\begin_layout Description
150 Labels must be defined in a code or data section when making an object
 file.
\end_layout

\begin_layout Description
151 Operand contains unresolvable labels or is too complex.
\end_layout

\begin_layout Standard
Labels must be resolvable to a relocatable address plus a constant.
 
\end_layout

\begin_layout Description
152 Executable code and data must be defined in an appropriate section.
\end_layout

\begin_layout Standard
Code or data defined in an invalid section.
 
\end_layout

\begin_layout Description
154 Each object file section must be contiguous.
\end_layout

\begin_layout Description
156 Operand must be an address label.
\end_layout

\begin_layout Standard
gpasm encountered a non-label operand where an address label was expected.
 
\end_layout

\begin_layout Description
157 ORG at odd address.
\end_layout

\begin_layout Standard
ORG directive must take an even address as the start of an absolute section.
 
\end_layout

\begin_layout Description
159 Cannot use FILL Directive with odd number of bytes.
\end_layout

\begin_layout Standard
In PIC18CXX devices the number of bytes must be even.
 
\end_layout

\begin_layout Description
163 __CONFIG directives must be contiguous.
\end_layout

\begin_layout Description
164 __IDLOC directives must be contiguous.
\end_layout

\begin_layout Description
165 Extended mode not available for this device.
\end_layout

\begin_layout Description
168 Square brackets required around offset operand.
\end_layout

\begin_layout Description
170 Expression within brackets must be constant.
\end_layout

\begin_layout Description
175 __IDLOCS directives must be listed in ascending order.
\end_layout

\begin_layout Description
176 An error with the CONFIG directive occured.
\end_layout

\begin_layout Description
177 You cannot mix CONFIG and __CONFIG directives.
\end_layout

\begin_layout Standard
CONFIG and __CONFIG directives cannot both be used in the same project.
 
\end_layout

\begin_layout Description
180 RES directive cannot reserve odd number of bytes in PIC18 absolute mode.
\end_layout

\begin_layout Description
1101 Internal error.
\end_layout

\begin_layout Description
1102 Parser error.
\end_layout

\begin_layout Description
1103 Scanner error.
\end_layout

\begin_layout Description
1501 IDLOCS directive use solely to the pic18 family.
\end_layout

\begin_layout Description
1502 The destination of the storage is not selected (W or F).
\end_layout

\begin_layout Description
1503 The access of RAM is not selected (A or B).
\end_layout

\begin_layout Description
1504 A string too length.
\end_layout

\begin_layout Description
1505 A register is located on the Access RAM.
\end_layout

\begin_layout Description
1506 A register is not located on the Access RAM.
\end_layout

\begin_layout Description
1507 Register in operand not in bank 0.
 Ensure bank bits are correct.
\end_layout

\begin_layout Standard
Accessing a register outside of bank 0.
 User must select the appropriate bank with banksel or similar directives.
\end_layout

\begin_layout Description
1508 Invalid RAM location specified.
\end_layout

\begin_layout Standard
gpasm encountered an invalid RAM location as specified by the __MAXRAM and
 __BADRAM directives.
\end_layout

\begin_layout Description
1509 Invalid ROM location specified.
\end_layout

\begin_layout Standard
gpasm encountered an invalid ROM location as specified by the __MAXROM and
 __BADROM directives.
\end_layout

\begin_layout Description
1510 Address exceeds maximum range for this processor.
\end_layout

\begin_layout Standard
Data emitted past maximum ROM address.
\end_layout

\begin_layout Description
1511 A symbol has no value.
\end_layout

\begin_layout Subsection
Warnings
\end_layout

\begin_layout Description
201 Symbol not previously defined.
\end_layout

\begin_layout Standard
The symbol being #undefined was not previously defined.
\end_layout

\begin_layout Description
202 Argument out of range.
 Least significant bits used.
\end_layout

\begin_layout Standard
The argument does not fit in the allocated space.
\end_layout

\begin_layout Description
203 Found opcode in column 1.
\end_layout

\begin_layout Standard
Opcodes should be indented to distinguish them from labels.
\end_layout

\begin_layout Description
205 Found directive in column 1.
\end_layout

\begin_layout Standard
Directives should be indented to distinguish them from labels.
\end_layout

\begin_layout Description
206 Found call to macro in column 1.
\end_layout

\begin_layout Standard
Macro calls should be indented to distinguish them from labels.
\end_layout

\begin_layout Description
207 Found label after column 1.
\end_layout

\begin_layout Standard
Labels should be unindented to distinguish them from directives and opcodes.
\end_layout

\begin_layout Description
209 Missing quote.
\end_layout

\begin_layout Standard
Inserted close quote after quoted string.
\end_layout

\begin_layout Description
211 Extraneous arguments on the line.
\end_layout

\begin_layout Standard
Extra arguments were found on the line.
\end_layout

\begin_layout Description
212 Expected.
\end_layout

\begin_layout Description
215 Processor superseded by command line.
\end_layout

\begin_layout Standard
The processor was specified on the command line and in the source file.
 The command line has precedence.
\end_layout

\begin_layout Description
216 Radix superseded by command line.
\end_layout

\begin_layout Standard
The radix was specified on the command line and in the source file.
 The command line has precedence.
\end_layout

\begin_layout Description
217 Hex file format specified on command line.
\end_layout

\begin_layout Standard
The hex file format was specified on the command line and in the source
 file.
 The command line has precedence.
\end_layout

\begin_layout Description
218 Expected dec, oct, hex.
 Will use hex.
\end_layout

\begin_layout Standard
gpasm encountered an invalid radix.
\end_layout

\begin_layout Description
219 Invalid RAM location specified.
\end_layout

\begin_layout Standard
gpasm encountered an invalid RAM location as specified by the __MAXRAM and
 __BADRAM directives.
\end_layout

\begin_layout Description
220 Address exceeds maximum range for this processor.
\end_layout

\begin_layout Standard
Data emitted past maximum ROM address.
\end_layout

\begin_layout Description
222 Error messages can not be disabled.
\end_layout

\begin_layout Standard
Error messages can not be disabled using the ERRORLEVEL directive.
\end_layout

\begin_layout Description
223 Redefining processor.
\end_layout

\begin_layout Standard
The processor is being reselected by the LIST or PROCESSOR directive.
\end_layout

\begin_layout Description
224 Use of this instruction is not recommanded.
\end_layout

\begin_layout Standard
Use of the TRIS and OPTION instructions is not recommended for a PIC16CXX
 device.
\end_layout

\begin_layout Description
226 Destination address must be word aligned.
\end_layout

\begin_layout Description
228 Invalid ROM location specified.
\end_layout

\begin_layout Standard
gpasm encountered an invalid ROM location as specified by the __MAXROM and
 __BADROM directives.
\end_layout

\begin_layout Description
1201 RAM Bank selection after skip instruction.
\end_layout

\begin_layout Description
1202 Processor type is undefined.
\end_layout

\begin_layout Description
1203 A register is located on the Access RAM.
\end_layout

\begin_layout Description
1204 A register is not located on the Access RAM.
\end_layout

\begin_layout Description
1205 The destination of the storage is not selected (W or F).
\end_layout

\begin_layout Description
1206 Register in operand not in bank 0.
 Ensure bank bits are correct.
\end_layout

\begin_layout Standard
Accessing a register outside of bank 0.
 User must select the appropriate bank with banksel or similar directives.
\end_layout

\begin_layout Description
1207 A string too long, will be truncated.
\end_layout

\begin_layout Description
1208 A symbol has no value.
\end_layout

\begin_layout Description
1299 A user-generated warning.
\end_layout

\begin_layout Subsection
Messages
\end_layout

\begin_layout Description
301 User Message
\end_layout

\begin_layout Standard
User message, invoked with the MESSG directive.
\end_layout

\begin_layout Description
302 Register in operand not in bank 0.
 Ensure bank bits are correct.
\end_layout

\begin_layout Standard
Accessing a register outside of bank 0.
 User must select the appropriate bank with banksel or similar directives.
\end_layout

\begin_layout Description
303 Program word too large.
 Truncated to core size.
\end_layout

\begin_layout Standard
gpasm has encounter a program word larger than the core size of the selected
 device.
 
\end_layout

\begin_layout Description
304 ID Locations value too large.
 Last four hex digits used.
\end_layout

\begin_layout Standard
The ID locations value specified is too large.
\end_layout

\begin_layout Description
305 Using default destination of 1 (file).
\end_layout

\begin_layout Standard
No destination was specified so the default location was used.
\end_layout

\begin_layout Description
306 Crossing page boundary – ensure page bits are set.
\end_layout

\begin_layout Standard
ROM address crossed boundary between pages.
 User must select appropriate page with pagesel or similar directives when
 using call or goto directives.
\end_layout

\begin_layout Description
307 Setting page bits.
\end_layout

\begin_layout Description
308 Warning level superceded by command line value.
\end_layout

\begin_layout Standard
The warning level was specified on the command line and in the source file.
 The command line has precedence.
\end_layout

\begin_layout Description
309 Macro expansion superceded by command line value.
\end_layout

\begin_layout Standard
Macro expansion was specified on the command line and in the source file.
 The command line has precedence.
\end_layout

\begin_layout Description
310 Superceding current maximum RAM and RAM map
\end_layout

\begin_layout Description
312 Page or Bank selection not needed for this device.
\end_layout

\begin_layout Standard
This device does not use special page or bank selection code.
\end_layout

\begin_layout Description
313 CBLOCK constants will start with a value of 0.
\end_layout

\begin_layout Standard
First CBLOCK has no initial value.
 Assuming a value of 0.
\end_layout

\begin_layout Description
316 W register modified.
\end_layout

\begin_layout Standard
Hidden use of the W register overwrites previous value.
 User may need to save and restore the original value.
\end_layout

\begin_layout Description
318 Special Instruction Mnemonic used.
\end_layout

\begin_layout Standard
Using special instruction mnemonic which may map to one or several instructions.
\end_layout

\begin_layout Description
1301 Using default access of 0 (Access Bank).
\end_layout

\begin_layout Description
1302 RAM Bank undefined in this chunk of code.
 Ensure that bank bits are correct.
\end_layout

\begin_layout Description
1303 Bank selection not needed for this device.
\end_layout

\begin_layout Standard
This device does not use special bank selection code.
\end_layout

\begin_layout Description
1304 Page selection not needed for this device.
\end_layout

\begin_layout Standard
This device does not use special page selection code.
\end_layout

\begin_layout Chapter
gplink
\end_layout

\begin_layout Standard
gplink relocates and links gpasm COFF objects and generates an absolute
 executable COFF.
\end_layout

\begin_layout Section
Running gplink
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Running gplink
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The general syntax for running gplink is
\end_layout

\begin_layout LyX-Code
gplink [options] [objects] [libraries]
\end_layout

\begin_layout Standard
Where options can be one of:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="24" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="block" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-a <format>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–hex-format <format>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Produce hex file in one of four formats: inhx8m, inhx8s, inhx16, inhx32
 (the default)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-b <level>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–optimize-banksel <level>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove unnecessary Banksel directives.
 [0]
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-c
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–object
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Output an executable object.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-C
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–no-cinit-warnings
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Disable this warnings of _cinit section with -O2 option: "Relocation symbol
 _cinit has no section."
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-d
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–debug
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display debug messages.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-f <value>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–fill <value>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Fill unused unprotected program memory with <value>
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-h
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–help
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show the help message.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-I <directory>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–include <directory>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Specify an include directory.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-j
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--no-save-local
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Disable the save of local registers to COD file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-l
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–no-list
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Disable the list file output.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-m
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–map
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Output a map file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–mplink-compatible
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MPLINK compatibility mode.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-o <file>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–output <file>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Alternate name of hex output file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-O <level>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–optimize <level>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Optimization level.
 [1]
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-p <level>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–optimize-pagesel <level>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove unnecessary Pagesel directives.
 [0]
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-q
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–quiet
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quiet.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-r
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–use-shared
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Attempt to relocate unshared data sections to shared memory if relocation
 fails.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-s <file>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–script <file>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Specify linker script.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-t <size>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–stack <size>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create a stack section.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strict-options
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
If this is set, then an option may not be parameter of an another option.
 For example: -s –quiet
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-u
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–macro <symbol[=value]>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add macro value for script.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-v
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–version
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print gplink version information and exit.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-w
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–processor-mismatch
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Disable processor mismatch warning.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Section
MPLINK compatibility mode
\end_layout

\begin_layout Standard
When the –mplink-compatibe command line option is specified gpl tries to
 mimic MPLINK behaviour:
\end_layout

\begin_layout Itemize
.cinit initialized data section is generated always, even if initialized
 data is not defined
\end_layout

\begin_layout Itemize
.cinit initialized data section is generated at the lowest possible address
 in the nonvolatile program memory (ROM)
\end_layout

\begin_layout Section
gplink outputs
\end_layout

\begin_layout Standard
gplink creates an absolute executable COFF.
 From this COFF a hex file and cod file are created.
 The executable COFF is only written when the 
\begin_inset Quotes eld
\end_inset

-c
\begin_inset Quotes erd
\end_inset

 option is added.
 This file is useful for simulating the design with mpsim.
 The cod file is used for simulating with gpsim.
\end_layout

\begin_layout Standard
gplink can also create a map file.
 The map file reports the final addresses gplink has assigned to the COFF
 sections.
 This is the same data that can be viewed in the executable COFF with gpvo.
\end_layout

\begin_layout Section
Linker scripts
\end_layout

\begin_layout Standard
gplink requires a linker script.
 This script tells gplink what memory is available in the target processor.
 A set of Microchip generated scripts are installed with gputils.
 These scripts were intended as a starting point, but for many applications
 they will work as is.
\end_layout

\begin_layout Standard
If the user does not specify a linker script, gplink will attempt to use
 the default script for the processor reported in the object file.
 The default location of the scripts is reported in the gplink help message.
\end_layout

\begin_layout Section
Stacks
\end_layout

\begin_layout Standard
gplink can create a stack section at link time using a stack directive in
 the linker script.
 The same feature can be utilized with a -t option on the command line.
 gplink will create the section and two symbols.
 _stack points to the beginning of the stack section and _stack_end points
 to the end.
\end_layout

\begin_layout Section
Optimization
\end_layout

\begin_layout Standard
gplink is an optimizing linker.
 There are four different optimzation levels.
 Each level includes all optimizations of lower levels.
 Increasing the level typically increases the link time required.
\end_layout

\begin_layout Subsection
Level 0
\end_layout

\begin_layout Standard
No optimizations.
\end_layout

\begin_layout Subsection
Level 1 (default)
\end_layout

\begin_layout Subsubsection
Weak Symbols
\end_layout

\begin_layout Standard
A weak symbol is an external symbol declaration that isn't used.
 These symbols are typically created by declaring functions or data that
 isn't used.
 Including these symbols might lead to extra objects being extracted from
 archives for symbol resolution.
 That will increase the data and program memory used.
 This optimzation removes all weak symbols when the object file is read
 by the linker.
\end_layout

\begin_layout Subsection
Level 2
\end_layout

\begin_layout Subsubsection
Dead Sections + Weak Symbols
\end_layout

\begin_layout Standard
A dead section is any section that doesn't have relocations pointing to
 its symbols.
 This means the code or data in the section is never accesed.
 This optimization removes the section and its symbols to reduce program
 and data memory.
 This optimization will not remove any absolute sections.
\end_layout

\begin_layout Subsection
Pagesel Level 0
\end_layout

\begin_layout Standard
No Pagesel optimizations.
\end_layout

\begin_layout Subsection
Pagesel Level 1
\end_layout

\begin_layout Subsubsection
Unnecessary Pagesel Directives
\end_layout

\begin_layout Standard
The Pagesel directive must use before a 
\begin_inset Quotes eld
\end_inset


\series bold
call label
\series default

\begin_inset Quotes erd
\end_inset

 or a 
\begin_inset Quotes eld
\end_inset


\series bold
goto label
\series default

\begin_inset Quotes erd
\end_inset

 instructions, if the 
\series bold
label
\series default
 is located in another code section.
 This address is not known at compile time in the non-absolute mode.
 It is possible that during linking the caller and the called objects will
 be located same page.
 In this case, there is no need for the Pagesel directive.
 This optmization removes the unnecessary Pagesel directives.
 In fact deletes the instructions which was created by this directive.
\end_layout

\begin_layout Subsection
Banksel Level 0
\end_layout

\begin_layout Standard
No Banksel optimizations.
\end_layout

\begin_layout Subsection
Banksel Level 1
\end_layout

\begin_layout Subsubsection
Unnecessary Banksel Directives
\end_layout

\begin_layout Standard
The Banksel directive must apply before use that registers, if these not
 located in the Common RAM or Access RAM area.
 These addresses is not known at compile time in the non-absolute mode.
 It is possible that during linking more register will be located a same
 RAM Bank.
 In this case, there is no need for the Banksel directive if these registers
 located in the same RAM Bank.
 This optmization removes the unnecessary Banksel directives.
 In fact deletes the instructions which was created by this directive.
\end_layout

\begin_layout Chapter
gplib
\end_layout

\begin_layout Standard
gplib creates, modifies and extracts COFF archives.
 This allows a related group of objects to be combined into one file.
 Then this one file is passed to gplink.
 
\end_layout

\begin_layout Section
Running gplib
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Running gplib
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The general syntax for running gplib is
\end_layout

\begin_layout LyX-Code
gplib [options] library [member]
\end_layout

\begin_layout Standard
Where options can be one of:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="11" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="block" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-c
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–create
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Create a new library.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-d
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–delete
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Delete member from library.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-h
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–help
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show the help message.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-n
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–no-index
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Don't add the symbol index.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-q
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–quiet
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quiet mode.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-r
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–replace
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Add or replace member from library.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-s
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–symbols
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
List global symbols in libary.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-t
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–list
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
List member in library.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-v
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–version
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print gplib version information and exit.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-x
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–extract
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Extract member from library.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Section
Creating an archive
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Creating an archive
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The most common operation is to create a new archive: 
\end_layout

\begin_layout LyX-Code
gplib -c math.a mult.o add.o sub.o
\end_layout

\begin_layout Standard
This command will create a new archive 
\begin_inset Quotes eld
\end_inset

math.a
\begin_inset Quotes erd
\end_inset

 that contains 
\begin_inset Quotes eld
\end_inset

mult.o add.o sub.o
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Standard
The name of the archive 
\begin_inset Quotes eld
\end_inset

math.a
\begin_inset Quotes erd
\end_inset

 is arbitrary.
 The tools do not use the file extension to determine file type.
 It could just as easily been 
\begin_inset Quotes eld
\end_inset

math.lib
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

math
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
When you use the library, simply add it to the list of object passed to
 gplink.
 gplink will scan the library and only extract the archive members that
 are required to resolve external references.
 So the application won't necessarily contain the code of all the archive
 members.
\end_layout

\begin_layout Section
Other gplib operations
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Other gplib operations
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Most of the other are useful , but will be used much less often.
 For example you can replace individual archive members, but most people
 elect to delete the old archive and create a new one.
\end_layout

\begin_layout Section
Archive format
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Archive format
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The file format is a standard COFF archive.
 A header is added to each member and the unmodified object is copied into
 the archive.
\end_layout

\begin_layout Standard
Being a standard archive they do include a symbol index.
 It provides a simple why to determine which member should be extract to
 resolve external references.
 This index is not included in mplib archives.
 So using gplib archives with Microchip Tools will probably cause problems
 unles the 
\begin_inset Quotes eld
\end_inset

-n
\begin_inset Quotes erd
\end_inset

 option is added when the archive is created.
\end_layout

\begin_layout Chapter
Utilities
\end_layout

\begin_layout Section
gpdasm
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
gpdasm
\end_layout

\end_inset


\end_layout

\begin_layout Standard
gpdasm is a disassembler for gputils.
 It converts hex files generated by gpasm and gplink into disassembled instructi
ons.
\end_layout

\begin_layout Subsection
Running gpdasm
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Running gpdasm
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The general syntax for running gpdasm is
\end_layout

\begin_layout LyX-Code
gpdasm [options] hex-file
\end_layout

\begin_layout Standard
Where options can be one of:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="17" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="block" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-c
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–mnemonics
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Decode the special mnemonics.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-h
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–help
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display the help message.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-i
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–hex-info
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show the informations of the input hex file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-j
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–mov-fsrn
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
In the MOVIW or MOVWI instructions show as base the FSRn register instead
 of the INDFn.
 [INDFn]
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-k <file>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–label-list <file>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
A file which lists the names and addresses of the labels in the disassembled
 program code.
 (With the -n, -o and -s options.)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-l
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–list-chips
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
List the supported processors.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-m
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–dump
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Memory dump of the input hex file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-n
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–show-names
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
For some case of SFR, shows the name of instead of the address.
 In addition shows the labels also.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-o
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–show-config
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show the CONFIG and IDLOCS - or __idlocs - directives.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-p<processor>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–processor <processor>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Select the processor.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-s
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–short
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print short form output.
 (Creates a compilable source.
 See also the -k, -n and -o options.)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-t
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–use-tab
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Uses tabulator character in the written disassembled text.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-v
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–version
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print the gpdasm version information and exit.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-y
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–extended
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enable 18xx extended mode.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strict
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Disassemble only opcodes generated by gpasm in case of instructions with
 several opcodes.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strict-options
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
If this is set, then an option may not be parameter of an another option.
 For example: -p –dump
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
gpdasm doesn't specifically create an output file.
 It dumps its output to the screen.
 This helps to reduce the risk that a good source file will be unintentionally
 overwritten.
 If you want to create an output file and your shell is 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
sh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

sh
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
bash
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

bash
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ksh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

ksh
\begin_inset Quotes erd
\end_inset

, you can do something like:
\end_layout

\begin_layout LyX-Code
gpdasm test.hex > test.dis
\end_layout

\begin_layout Standard
This redirects standard output to the file 
\begin_inset Quotes eld
\end_inset

test.dis
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Subsection
Comments on Disassembling
\end_layout

\begin_layout Itemize
The gpdasm only uses a hex file as an input.
 Because of this it has no way to distinguish between instructions and data
 in program memory.
 
\end_layout

\begin_layout Itemize
If gpdasm encounters an unknown instruction it uses the DW directive and
 treats it as raw data.
\end_layout

\begin_layout Itemize
There are DON'T CARE bits in the instruction words.
 Normally, this isn't a problem.
 It could be, however, if a file with data in the program memory space is
 disassembled and then reassembled.
 Example: gpdasm will treat 0x0060 in a 14 bit device as a NOP.
 If the output is then reassembled, gpasm will assign a 0x0000 value.
 The value has changed and both tools are behaving correctly.
\end_layout

\begin_layout Itemize
In this case helps the 
\begin_inset Quotes eld
\end_inset

-k <list_file>
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

–label-list
\begin_inset Quotes erd
\end_inset

 <list_file> command line options (with the -n, -o and -s options).
 The description of the format of the list file can be found in the 
\emph on
gpdasm_sample.ulist
\emph default
 
\begin_inset Newline newline
\end_inset

For example:
\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset


\begin_inset space ~
\end_inset

gpdasm -nos 
\emph on
-k test.ulist
\emph default
 -p12f1822 test.hex > test.dis
\end_layout

\begin_layout Section
gpstrip
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
gpvo
\end_layout

\end_inset


\end_layout

\begin_layout Standard
gpstrip manipulates the sections and symbol tables of gputils object files.
\end_layout

\begin_layout Subsection
Running gpstrip
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Running gpvo
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The general syntax for running gpstrip is
\end_layout

\begin_layout LyX-Code
gpstrip [options] object-file
\end_layout

\begin_layout Standard
Where options can be one of:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="14" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="block" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-g
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strip-debug
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Strip debug symbols.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-h
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–help
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show the help message.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-k <symbol>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–keep-symbol <symbol>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Keep symbol.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-n <symbol>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strip-symbol <symbol>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove symbol.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-o <file>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–output <file>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Alternate output file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-p
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–preserve-dates
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Preserve dates.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-r <section>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–remove-section <section>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove section.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strict-options
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
If this is set, then an option may not be parameter of an another option.
 For example: -o –version
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-s
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strip-all
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove all symbols.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-u
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strip-unneeded
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove all symbols not needed for relocations.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-v
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–version
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show version.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-V
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–verbose
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Verbose mode.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-x
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–discard-all
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Remove non-global symbols.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Section
gpvc
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
gpvc
\end_layout

\end_inset


\end_layout

\begin_layout Standard
gpvc is cod file viewer for gputils.
 It provides an easy way to view the contents of the cod files generated
 by gpasm and gplink.
\end_layout

\begin_layout Subsection
Running gpvc
\begin_inset Index idx
status open

\begin_layout Plain Layout
Running gpvc
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The general syntax for running gpvc is
\end_layout

\begin_layout LyX-Code
gpvc [options] cod-file
\end_layout

\begin_layout Standard
Where options can be one of:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="10" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="block" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-a
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–all
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display all information.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-d
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–directory
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display directory header.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-h
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–help
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show the help message.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-l
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–listing
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display source listing.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-m
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–message
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display debug message area.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-r
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–rom
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display ROM.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-s
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–symbols
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Display symbols.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-v
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–version
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print gpvc version information and exit.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-w
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-wide
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show code table in wider (16 columns) view.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
gpvc doesn't specifically create an output file.
 It dumps its output to the screen.
 If you want to create an output file and your shell is 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
sh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

sh
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
bash
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

bash
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ksh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

ksh
\begin_inset Quotes erd
\end_inset

, you can do something like:
\end_layout

\begin_layout LyX-Code
gpvc test.cod > test.dump
\end_layout

\begin_layout Standard
This redirects standard output to the file 
\begin_inset Quotes eld
\end_inset

test.dump
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Section
gpvo
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
gpvo
\end_layout

\end_inset


\end_layout

\begin_layout Standard
gpvo is COFF object file viewer for gputils.
 It provides an easy way to view the contents of objects generated by gpasm
 and gplink.
\end_layout

\begin_layout Subsection
Running gpvo
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
Running gpvo
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The general syntax for running gpvo is
\end_layout

\begin_layout LyX-Code
gpvo [options] object-file
\end_layout

\begin_layout Standard
Where options can be one of:
\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset Tabular
<lyxtabular version="3" rows="12" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="block" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Long option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-b
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–binary
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Binary data.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-c
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–mnemonics
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Decode special mnemonics.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-f
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–file
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
File header.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-h
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–help
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Show the help message.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-n
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–no-names
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Suppress filenames.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-s
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–section
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Section data.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–strict-options
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
If this is set, then an option may not be parameter of an another option.
 For example: -x –symbol
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-t
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–symbol
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Symbol data.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-v
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–version
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Print gpvo version information and exit.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-x <file>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–export <file>
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Export symbols to an include file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-y
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
–extended
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Enable 18xx extended mode.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 0.3cm
\end_inset


\end_layout

\begin_layout Standard
gpvo doesn't specifically create an output file.
 It dumps its output to the screen.
 If you want to create an output file and your shell is 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
sh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

sh
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
bash
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

bash
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Index idx
status collapsed

\begin_layout Plain Layout
ksh
\end_layout

\end_inset


\begin_inset Quotes eld
\end_inset

ksh
\begin_inset Quotes erd
\end_inset

, you can do something like:
\end_layout

\begin_layout LyX-Code
gpvo test.obj > test.dump
\end_layout

\begin_layout Standard
This redirects standard output to the file 
\begin_inset Quotes eld
\end_inset

test.dump
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset CommandInset index_print
LatexCommand printindex
type "idx"

\end_inset


\end_layout

\end_body
\end_document
