2 /*************************************************************************************
5 * Author: Bakalex (bakalex@gmail.com)
6 * Copyright: (c) 2004 Bakalex, Nigel McNie (http://qbnz.com/highlighter)
7 * Release Version: 1.0.8.3
8 * Date Started: 2004/12/6
10 * Microchip Assembler language file for GeSHi.
14 * 2008/05/23 (1.0.7.22)
15 * - Added description of extra language features (SF#1970248)
19 * TODO (updated 2005/12/6)
20 * -------------------------
22 * For the moment, i've only added PIC16C6X registers. We need more (PIC16F/C7x/8x,
23 * PIC10, PIC18 and dsPIC registers).
24 * Must take a look to dsPIC instructions.
26 *************************************************************************************
28 * This file is part of GeSHi.
30 * GeSHi is free software; you can redistribute it and/or modify
31 * it under the terms of the GNU General Public License as published by
32 * the Free Software Foundation; either version 2 of the License, or
33 * (at your option) any later version.
35 * GeSHi is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
40 * You should have received a copy of the GNU General Public License
41 * along with GeSHi; if not, write to the Free Software
42 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
44 ************************************************************************************/
46 $language_data = array (
47 'LANG_NAME' => 'Microchip Assembler',
48 'COMMENT_SINGLE' => array(1 => ';'),
49 'COMMENT_MULTI' => array(),
50 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
51 'QUOTEMARKS' => array("'", '"'),
54 /*Directive Language*/
56 'CONSTANT', '#DEFINE', 'END', 'EQU', 'ERROR', 'ERROR-LEVEL', '#INCLUDE', 'LIST',
57 'MESSG', 'NOLIST', 'ORG', 'PAGE', 'PROCESSOR', 'RADIX', 'SET', 'SPACE', 'SUBTITLE',
58 'TITLE', '#UNDEFINE', 'VARIABLE', 'ELSE', 'ENDIF', 'ENDW', 'IF', 'IFDEF', 'IFNDEF',
59 'WHILE', '__BADRAM', 'CBLOCK', '__CONFIG', 'DA', 'DATA', 'DB', 'DE', 'DT', 'DW',
60 'ENDC', 'FILL', '__IDLOCS', '__MAXRAM', 'RES', 'ENDM', 'EXITM', 'EXPAND', 'LOCAL',
61 'MACRO', 'NOEXPAND', 'BANKISEL', 'BANKSEL', 'CODE', 'EXTERN', 'GLOBAL', 'IDATA',
62 'PAGESEL', 'UDATA', 'UDATA_ACS', 'UDATA_OVR', 'UDATA_SHR'
64 /* 12&14-bit Specific Instruction Set*/
66 'andlw', 'call', 'clrwdt', 'goto', 'iorlw', 'movlw', 'option', 'retlw', 'sleep',
67 'tris', 'xorlw', 'addwf', 'andwf', 'clrf', 'clrw', 'comf', 'decf', 'decfsz', 'incf',
68 'incfsz', 'iorwf', 'movf', 'nop', 'rlf', 'rrf', 'subwf', 'swapf', 'xorwf',
69 'bcf', 'bsf', 'btfsc', 'btfss',
70 'addlw', 'retfie', 'return', 'sublw', 'addcf', 'adddcf', 'b', 'bc', 'bdc',
71 'bnc', 'bndc', 'bnz', 'bz', 'clrc', 'clrdc', 'clrz', 'lcall', 'lgoto', 'movfw',
72 'negf', 'setc', 'setdc', 'setz', 'skpc', 'skpdc', 'skpnc', 'skpndc', 'skpnz', 'skpz',
73 'subcf', 'subdcf', 'tstf'
75 /* 16-bit Specific Instructiob Set */
77 'movfp', 'movlb', 'movlp', 'movpf', 'movwf', 'tablrd', 'tablwt', 'tlrd', 'tlwt',
78 'addwfc', 'daw', 'mullw', 'negw', 'rlcf', 'rlncf', 'rrcf', 'rrncf', 'setf', 'subwfb',
79 'btg', 'cpfseq', 'cpfsgt', 'cpfslt', 'dcfsnz', 'infsnz', 'tstfsz', 'lfsr', 'bnn',
80 'bnov', 'bra', 'pop', 'push', 'rcall', 'reset'
84 'INDF', 'TMR0', 'PCL', 'STATUS', 'FSR', 'PORTA', 'PORTB', 'PORTC', 'PORTD', 'PORTE',
85 'PCLATH', 'INTCON', 'PIR1', 'PIR2', 'TMR1L', 'TMR1H', 'T1CON', 'TMR2', 'T2CON', 'TMR2L',
86 'TMR2H', 'TMR0H', 'TMR0L', 'SSPBUF', 'SSPCON', 'CCPR1L', 'CCPR1H', 'CCP1CON', 'RCSTA',
87 'TXREG', 'RCREG', 'CCPR2L', 'CCPR2H', 'CCP2CON', 'OPTION', 'TRISA', 'TRISB', 'TRISC',
88 'TRISD', 'TRISE', 'PIE2', 'PIE1', 'PR2', 'SSPADD', 'SSPSTAT', 'TXSTA', 'SPBRG'
98 'CASE_SENSITIVE' => array(
99 GESHI_COMMENTS
=> false,
108 1 => 'color: #00007f;',
109 2 => 'color: #0000ff;',
110 3 => 'color: #007f00;',
111 4 => 'color: #46aa03; font-weight:bold;',
112 5 => 'color: #7f0000;'
115 1 => 'color: #adadad; font-style: italic;',
117 'ESCAPE_CHAR' => array(
118 0 => 'color: #000099; font-weight: bold;'
121 0 => 'color: #66cc66;'
124 0 => 'color: #7f007f;'
127 0 => 'color: #ff0000;'
132 0 => 'color: #66cc66;'
135 0 => 'color: #ff0000;',
136 1 => 'color: #ff0000;'
149 'OBJECT_SPLITTERS' => array(
153 0 => '[0-9a-fA-F]{1,32}[hH]',
155 1 => '[01]{1,64}[bB]'
157 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
158 'SCRIPT_DELIMITERS' => array(
160 'HIGHLIGHT_STRICT_BLOCK' => array(