[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/geshi/geshi/src/geshi/ -> 6502acme.php (source)

   1  <?php
   2  /*************************************************************************************
   3   * 6502acme.php
   4   * -------
   5   * Author: Warren Willmey
   6   * Copyright: (c) 2010 Warren Willmey.
   7   * Release Version: 1.0.9.1
   8   * Date Started: 2010/05/26
   9   *
  10   * MOS 6502 (more specifically 6510) ACME Cross Assembler 0.93 by Marco Baye language file for GeSHi.
  11   *
  12   * CHANGES
  13   * -------
  14   * 2010/07/22
  15   *  -  First Release
  16   *
  17   * TODO (updated 2010/07/22)
  18   * -------------------------
  19   *
  20   *************************************************************************************
  21   *
  22   *     This file is part of GeSHi.
  23   *
  24   *   GeSHi is free software; you can redistribute it and/or modify
  25   *   it under the terms of the GNU General Public License as published by
  26   *   the Free Software Foundation; either version 2 of the License, or
  27   *   (at your option) any later version.
  28   *
  29   *   GeSHi is distributed in the hope that it will be useful,
  30   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  31   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  32   *   GNU General Public License for more details.
  33   *
  34   *   You should have received a copy of the GNU General Public License
  35   *   along with GeSHi; if not, write to the Free Software
  36   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  37   *
  38   ************************************************************************************/
  39  
  40  $language_data = array (
  41      'LANG_NAME' => 'MOS 6502 (6510) ACME Cross Assembler format',
  42      'COMMENT_SINGLE' => array(1 => ';'),
  43      'COMMENT_MULTI' => array(),
  44      'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  45      'QUOTEMARKS' => array("'", '"'),
  46      'ESCAPE_CHAR' => '',
  47      'KEYWORDS' => array(
  48          /* 6502/6510 Opcodes. */
  49          1 => array(
  50              'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi',
  51              'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli',
  52              'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor',
  53              'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy',
  54              'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol',
  55              'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta',
  56              'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya',
  57              ),
  58          /* Index Registers, yes the 6502 has other registers by they are only
  59          * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */
  60          2 => array(
  61              'x', 'y', 's'
  62              ),
  63          /* Directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */
  64          3 => array(
  65              '!8', '!08', '!by', '!byte',
  66              '!16', '!wo', '!word',
  67              '!24', '!32',
  68              '!fi', '!fill',
  69              '!align',
  70              '!ct', '!convtab',
  71              '!tx', '!text',
  72              '!pet',
  73              '!raw',
  74              '!scrxor',
  75              '!to',
  76              '!source',
  77              '!bin', '!binary',
  78              '!zn', '!zone',
  79              '!sl',
  80              '!svl',
  81              '!sal',
  82              '!if', '!ifdef',
  83              '!for',
  84              '!set',
  85              '!do', 'while', 'until',
  86              '!eof', '!endoffile',
  87              '!warn', '!error', '!serious',
  88              '!macro',
  89  //            , '*='        // Not a valid keyword (uses both * and = signs) moved to symbols instead.
  90              '!initmem',
  91              '!pseudopc',
  92              '!cpu',
  93              '!al', '!as', '!rl', '!rs',
  94              ),
  95  
  96          /* 6502/6510 undocumented opcodes (often referred to as illegal instructions).
  97          *  These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816.
  98          *  As they are undocumented instructions there are no "official" names for them, there are also
  99          *  several more that mainly perform various forms of crash and are not supported by ACME 0.93.
 100          */
 101          4 => array(
 102              'anc', 'arr', 'asr', 'dcp', 'dop', 'isc', 'jam', 'lax',
 103              'rla', 'rra', 'sax', 'sbx', 'slo', 'sre', 'top',
 104              ),
 105          /* 65c02 instructions, MOS added a few (much needed) instructions in the CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes.
 106          *  ACME 0.93 does not support the rmb0-7 and smb0-7 instructions (they are currently rem'ed out).  */
 107          5 => array(
 108              'bra', 'phx', 'phy', 'plx', 'ply', 'stz', 'trb', 'tsb'
 109              ),
 110          /* 65816 instructions. */
 111          6 => array(
 112              'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei',
 113              'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl',
 114              'sep', 'tcd', 'tcs', 'tdc', 'tsc', 'txy', 'tyx', 'wdm',
 115              'xba', 'xce',
 116              ),
 117          /* Deprecated directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */
 118          7 => array(
 119              '!cbm',
 120              '!sz', '!subzone',
 121              '!realpc',
 122              ),
 123          /* Math functions, some are aliases for the symbols. */
 124          8 => array(
 125              'not', 'div', 'mod', 'xor', 'or', 'sin', 'cos', 'tan',
 126              'arcsin', 'arccos', 'arctan', 'int', 'float',
 127  
 128              ),
 129  
 130          ),
 131      'SYMBOLS' => array(
 132  //        '[', ']', '(', ')', '{', '}',    // These are already defined by GeSHi as BRACKETS.
 133          '*=', '#', '!', '^', '-', '*', '/',
 134          '%', '+', '-', '<<', '>>', '>>>',
 135          '<', '>', '^', '<=', '<', '>=', '>', '!=',
 136          '=', '&', '|', '<>',
 137          ),
 138      'CASE_SENSITIVE' => array(
 139          GESHI_COMMENTS => false,
 140          1 => false,
 141          2 => false,
 142          3 => false,
 143          4 => false,
 144          5 => false,
 145          6 => false,
 146          7 => false,
 147          8 => false,
 148          ),
 149      'STYLES' => array(
 150          'KEYWORDS' => array(
 151              1 => 'color: #00f; font-weight:bold;',
 152              2 => 'color: #00f; font-weight:bold;',
 153              3 => 'color: #080; font-weight:bold;',
 154              4 => 'color: #f00; font-weight:bold;',
 155              5 => 'color: #80f; font-weight:bold;',
 156              6 => 'color: #f08; font-weight:bold;',
 157              7 => 'color: #a04; font-weight:bold; font-style: italic;',
 158              8 => 'color: #000;',
 159              ),
 160          'COMMENTS' => array(
 161              1 => 'color: #999; font-style: italic;',
 162              ),
 163          'ESCAPE_CHAR' => array(
 164              0 => 'color: #009; font-weight: bold;'
 165              ),
 166          'BRACKETS' => array(
 167              0 => 'color: #000;'
 168              ),
 169          'STRINGS' => array(
 170              0 => 'color: #080;'
 171              ),
 172          'NUMBERS' => array(
 173              GESHI_NUMBER_INT_BASIC          => 'color: #f00;',
 174              GESHI_NUMBER_HEX_PREFIX_DOLLAR  => 'color: #f00;',
 175              GESHI_NUMBER_HEX_PREFIX         => 'color: #f00;',
 176              GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;',
 177              GESHI_NUMBER_FLT_NONSCI         => 'color: #f00;',
 178              ),
 179          'METHODS' => array(
 180              ),
 181          'SYMBOLS' => array(
 182              0 => 'color: #080;'
 183              ),
 184          'REGEXPS' => array(
 185              0   => 'color: #f00;'
 186              , 1 => 'color: #933;'
 187              ),
 188          'SCRIPT' => array(
 189              )
 190          ),
 191      'URLS' => array(
 192          1 => '',
 193          2 => '',
 194          3 => '',
 195          4 => '',
 196          5 => '',
 197          6 => '',
 198          7 => '',
 199          8 => '',
 200          ),
 201      'OOLANG' => false,
 202      'OBJECT_SPLITTERS' => array(
 203          ),
 204      'NUMBERS' =>
 205          GESHI_NUMBER_INT_BASIC |
 206          GESHI_NUMBER_FLT_NONSCI |
 207          GESHI_NUMBER_HEX_PREFIX_DOLLAR |
 208          GESHI_NUMBER_HEX_PREFIX |
 209          GESHI_NUMBER_BIN_PREFIX_PERCENT,
 210          // AMCE Octal format not support and gets picked up as Decimal unfortunately.
 211      'REGEXPS' => array(
 212          //ACME .# Binary number format. e.g. %..##..##..##
 213          0 => '\%[\.\#]{1,64}',
 214          //ACME Local Labels
 215          1 => '\.[_a-zA-Z][_a-zA-Z0-9]*',
 216          ),
 217      'STRICT_MODE_APPLIES' => GESHI_NEVER,
 218      'SCRIPT_DELIMITERS' => array(
 219          ),
 220      'HIGHLIGHT_STRICT_BLOCK' => array(
 221          ),
 222      'TAB_WIDTH' => 8,
 223      'PARSER_CONTROL' => array(
 224          'NUMBERS' => array(
 225              'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/'
 226              )
 227          )
 228  );