KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mpasm.php 6.0KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <?php
  2. /*************************************************************************************
  3. * mpasm.php
  4. * ---------
  5. * Author: Bakalex (bakalex@gmail.com)
  6. * Copyright: (c) 2004 Bakalex, Nigel McNie (http://qbnz.com/highlighter)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2004/12/6
  9. *
  10. * Microchip Assembler language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/05/23 (1.0.7.22)
  15. * - Added description of extra language features (SF#1970248)
  16. * 2005/01/29 (1.0.0)
  17. * - First Release
  18. *
  19. * TODO (updated 2005/12/6)
  20. * -------------------------
  21. *
  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.
  25. *
  26. *************************************************************************************
  27. *
  28. * This file is part of GeSHi.
  29. *
  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.
  34. *
  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.
  39. *
  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
  43. *
  44. ************************************************************************************/
  45. $language_data = array (
  46. 'LANG_NAME' => 'Microchip Assembler',
  47. 'COMMENT_SINGLE' => array(1 => ';'),
  48. 'COMMENT_MULTI' => array(),
  49. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  50. 'QUOTEMARKS' => array("'", '"'),
  51. 'ESCAPE_CHAR' => '',
  52. 'KEYWORDS' => array(
  53. /*Directive Language*/
  54. 4 => array(
  55. 'CONSTANT', '#DEFINE', 'END', 'EQU', 'ERROR', 'ERROR-LEVEL', '#INCLUDE', 'LIST',
  56. 'MESSG', 'NOLIST', 'ORG', 'PAGE', 'PROCESSOR', 'RADIX', 'SET', 'SPACE', 'SUBTITLE',
  57. 'TITLE', '#UNDEFINE', 'VARIABLE', 'ELSE', 'ENDIF', 'ENDW', 'IF', 'IFDEF', 'IFNDEF',
  58. 'WHILE', '__BADRAM', 'CBLOCK', '__CONFIG', 'DA', 'DATA', 'DB', 'DE', 'DT', 'DW',
  59. 'ENDC', 'FILL', '__IDLOCS', '__MAXRAM', 'RES', 'ENDM', 'EXITM', 'EXPAND', 'LOCAL',
  60. 'MACRO', 'NOEXPAND', 'BANKISEL', 'BANKSEL', 'CODE', 'EXTERN', 'GLOBAL', 'IDATA',
  61. 'PAGESEL', 'UDATA', 'UDATA_ACS', 'UDATA_OVR', 'UDATA_SHR'
  62. ),
  63. /* 12&14-bit Specific Instruction Set*/
  64. 1 => array(
  65. 'andlw', 'call', 'clrwdt', 'goto', 'iorlw', 'movlw', 'option', 'retlw', 'sleep',
  66. 'tris', 'xorlw', 'addwf', 'andwf', 'clrf', 'clrw', 'comf', 'decf', 'decfsz', 'incf',
  67. 'incfsz', 'iorwf', 'movf', 'nop', 'rlf', 'rrf', 'subwf', 'swapf', 'xorwf',
  68. 'bcf', 'bsf', 'btfsc', 'btfss',
  69. 'addlw', 'retfie', 'return', 'sublw', 'addcf', 'adddcf', 'b', 'bc', 'bdc',
  70. 'bnc', 'bndc', 'bnz', 'bz', 'clrc', 'clrdc', 'clrz', 'lcall', 'lgoto', 'movfw',
  71. 'negf', 'setc', 'setdc', 'setz', 'skpc', 'skpdc', 'skpnc', 'skpndc', 'skpnz', 'skpz',
  72. 'subcf', 'subdcf', 'tstf'
  73. ),
  74. /* 16-bit Specific Instructiob Set */
  75. 2 => array (
  76. 'movfp', 'movlb', 'movlp', 'movpf', 'movwf', 'tablrd', 'tablwt', 'tlrd', 'tlwt',
  77. 'addwfc', 'daw', 'mullw', 'negw', 'rlcf', 'rlncf', 'rrcf', 'rrncf', 'setf', 'subwfb',
  78. 'btg', 'cpfseq', 'cpfsgt', 'cpfslt', 'dcfsnz', 'infsnz', 'tstfsz', 'lfsr', 'bnn',
  79. 'bnov', 'bra', 'pop', 'push', 'rcall', 'reset'
  80. ),
  81. /* Registers */
  82. 3 => array(
  83. 'INDF', 'TMR0', 'PCL', 'STATUS', 'FSR', 'PORTA', 'PORTB', 'PORTC', 'PORTD', 'PORTE',
  84. 'PCLATH', 'INTCON', 'PIR1', 'PIR2', 'TMR1L', 'TMR1H', 'T1CON', 'TMR2', 'T2CON', 'TMR2L',
  85. 'TMR2H', 'TMR0H', 'TMR0L', 'SSPBUF', 'SSPCON', 'CCPR1L', 'CCPR1H', 'CCP1CON', 'RCSTA',
  86. 'TXREG', 'RCREG', 'CCPR2L', 'CCPR2H', 'CCP2CON', 'OPTION', 'TRISA', 'TRISB', 'TRISC',
  87. 'TRISD', 'TRISE', 'PIE2', 'PIE1', 'PR2', 'SSPADD', 'SSPSTAT', 'TXSTA', 'SPBRG'
  88. ),
  89. /*Operands*/
  90. 5 => array(
  91. 'high','low'
  92. )
  93. ),
  94. 'SYMBOLS' => array(
  95. '[', ']', '(', ')'
  96. ),
  97. 'CASE_SENSITIVE' => array(
  98. GESHI_COMMENTS => false,
  99. 1 => false,
  100. 2 => false,
  101. 3 => false,
  102. 4 => false,
  103. 5 => false
  104. ),
  105. 'STYLES' => array(
  106. 'KEYWORDS' => array(
  107. 1 => 'color: #00007f;',
  108. 2 => 'color: #0000ff;',
  109. 3 => 'color: #007f00;',
  110. 4 => 'color: #46aa03; font-weight:bold;',
  111. 5 => 'color: #7f0000;'
  112. ),
  113. 'COMMENTS' => array(
  114. 1 => 'color: #adadad; font-style: italic;',
  115. ),
  116. 'ESCAPE_CHAR' => array(
  117. 0 => 'color: #000099; font-weight: bold;'
  118. ),
  119. 'BRACKETS' => array(
  120. 0 => 'color: #66cc66;'
  121. ),
  122. 'STRINGS' => array(
  123. 0 => 'color: #7f007f;'
  124. ),
  125. 'NUMBERS' => array(
  126. 0 => 'color: #ff0000;'
  127. ),
  128. 'METHODS' => array(
  129. ),
  130. 'SYMBOLS' => array(
  131. 0 => 'color: #66cc66;'
  132. ),
  133. 'REGEXPS' => array(
  134. 0 => 'color: #ff0000;',
  135. 1 => 'color: #ff0000;'
  136. ),
  137. 'SCRIPT' => array(
  138. )
  139. ),
  140. 'URLS' => array(
  141. 1 => '',
  142. 2 => '',
  143. 3 => '',
  144. 4 => '',
  145. 5 => ''
  146. ),
  147. 'OOLANG' => false,
  148. 'OBJECT_SPLITTERS' => array(
  149. ),
  150. 'REGEXPS' => array(
  151. //Hex numbers
  152. 0 => '[0-9a-fA-F]{1,32}[hH]',
  153. //Binary numbers
  154. 1 => '[01]{1,64}[bB]'
  155. ),
  156. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  157. 'SCRIPT_DELIMITERS' => array(
  158. ),
  159. 'HIGHLIGHT_STRICT_BLOCK' => array(
  160. )
  161. );
  162. ?>