home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fte0827.zip / config / m_a51.fte < prev    next >
Text File  |  1999-05-16  |  5KB  |  160 lines

  1. # 8051 assembler mode
  2.  
  3. colorize ASM51 {
  4.     SyntaxParser = 'SIMPLE';
  5.     
  6.     color {
  7.         { 'Normal',        'Lang_Default' },
  8.         { 'Keyword',       'Editor_Keywords' },
  9.         { 'Number',        'Lang_DecimalNumber' },
  10.         { 'HexNumber',     'Lang_HexNumber' },
  11.         { 'Punctuation',   'Lang_Punctuation' },
  12.         { 'String',        'Lang_String' },
  13.         { 'Comment',       'Lang_Comment' },
  14.         { 'Function',      'Lang_Function' },
  15.         { 'Label',         'Lang_Label' },
  16.         
  17.         #{ 'Normal',        '1E' },
  18.         #{ 'Keyword',       '1F' },
  19.         #{ 'Number',        '1D' },
  20.         #{ 'HexNumber',     '1D' },
  21.         #{ 'Punctuation',   '13' },
  22.         #{ 'String',        '1E' },
  23.         #{ 'Comment',       '17' },
  24.         #{ 'Function',      '1B' },
  25.         #{ 'Label',         '1C' },
  26.     };
  27.  
  28. #keyword '1F' {
  29.  
  30.     keyword 'Editor_Keywords' {
  31.         'mov', 'push', 'pop', 'movc', 'movx',
  32.         'anl', 'da', 'orl', 'xrl', 'nop',
  33.         'add', 'addc', 'subb', 'mul', 'div',
  34.         'clr', 'setb', 'cpl', 'xch', 'xchd',
  35.         'inc', 'dec', 'rl', 'rlc', 'rrc',
  36.     };
  37.  
  38. #    keyword '1B' {
  39.     keyword 'Editor_Keywords3' {
  40.         'a', 'acc', 'b', 'dpl', 'dph', 'dptr',
  41.         'R0', 'R1', 'R2', 'R3',
  42.         'R4', 'R5', 'R6', 'R7',
  43.         'IE', 'IP', 'P0', 'P1',
  44.         'P2', 'P3', 'PCON', 'PSW',
  45.         'PSW', 'SBUF', 'SCON', 'SP', 'TCON', 'TH0',
  46.         'TH1', 'TL0', 'TL1', 'TMOD',
  47.         'T2CON', 'TH2', 'TL2', 'RCAP2H', 'RCAP2L',
  48.     };
  49.  
  50. keyword 'Editor_Keywords4' {
  51.     'SM0', 'SM1', 'SM2', 'REN', 'TB8',
  52.     'RB8', 'TI', 'RI', 'E0', 'E1', 'E2',
  53.     'E3', 'E4', 'E5', 'E6', 'E7', 'F0',
  54.     'F1', 'F2', 'F3', 'F4', 'F5', 'F6',
  55.     'F7', 'EA', 'ES', 'ET1', 'EX1', 'ET0',
  56.     'EX0', 'T2', 'T2EX', 'TF1', 'TR1',
  57.     'TF0', 'TR0', 'IE1', 'IT1', 'IE0',
  58.     'IT0', 'TF2', 'EXF2', 'RCLK', 'TCLK',
  59.     'EXEN2', 'TR2', 'C/T2', 'CP/RL2',
  60.     'P0.0', 'P0.1', 'P0.2', 'P0.3',
  61.     'P0.4', 'P0.5', 'P0.6', 'P0.7',
  62.     'P1.0', 'P1.1', 'P1.2', 'P1.3',
  63.     'P1.4', 'P1.5', 'P1.6', 'P1.7',
  64.     'P2.0', 'P2.1', 'P2.2', 'P2.3',
  65.     'P2.4', 'P2.5', 'P2.6', 'P2.7',
  66.     'P3.0', 'P3.1', 'P3.2', 'P3.3',
  67.     'P3.4', 'P3.5', 'P3.6', 'P3.7',
  68. };
  69.  
  70. #    keyword '1C' {
  71.     keyword 'Editor_Keywords2' {
  72.         'acall', 'lcall', 'ret', 'reti',
  73.         'jmp',
  74.         'jb', 'jnb',
  75.         'jc', 'jnc', 'jbc', 'ajmp',
  76.         'ljmp', 'sjmp', 'jz', 'jnz',
  77.         'cjne', 'djnz',
  78.     };
  79.  
  80. #    keyword '1E' {
  81.     keyword 'Editor_Keywords5' {
  82.         'cseg', 'dseg',
  83.         'dw', 'db',
  84.         'AND', 'OR', 'LE', 'GT', 'EQ',
  85.         'if', 'ifdef', 'ifndef', 'endif', 'else',
  86.         'public', 'extrn',
  87.         'macro', 'endm',
  88.         'end', 'org',
  89.         'proc', 'endp', 'equ', 'define',
  90.         '$TT', '$DA', '$EJ', '$PW',
  91.         'db', 'dw',
  92.         'model', 'ideal', 'codeseg', 'dataseg', 'stack', 'include', 'locals',
  93.     };
  94.     
  95. #    keyword '1A' {
  96. #        'AND', 'OR', 'LE', 'GT', 'EQ',
  97. #        'if', 'ifdef', 'ifndef', 'endif', 'else',
  98. #        'public', 'extrn',
  99. #        'macro', 'endm',
  100. #        'end', 'org',
  101. #        'proc', 'endp', 'equ', 'define',
  102. #        '$TT', '$DA', '$EJ', '$PW',
  103. #        'db', 'dw',
  104. #        'model', 'ideal', 'codeseg', 'dataseg', 'stack', 'include', 'locals',
  105. #    };
  106.  
  107.     h_state 0 { 'Normal' }
  108.     h_trans { 5, '-s', 'a-zA-Z_$@', 'Normal' }
  109.     h_trans { 1, '<', ';', 'Comment' }
  110.     h_trans { 2, '<', '\'', 'String' }
  111.     h_trans { 3, '<', '"', 'String' }
  112.     h_trans { 4, '-s', '0-9', 'Number' }
  113.     h_trans { 0, 'S', 'a-zA-Z0-9_$@', 'Punctuation' }
  114.  
  115.     h_state 1 { 'Comment' }
  116.     h_trans { 0, '$', '', 'Comment' }
  117.  
  118.     h_state 2 { 'String' }
  119.     h_trans { 0, '$', '', 'Normal' }
  120.     h_trans { 0, '', '\'', 'String' }
  121.  
  122.     h_state 3 { 'String' }
  123.     h_trans { 0, '$', '', 'Normal' }
  124.     h_trans { 0, '', '"', 'String' }
  125.  
  126.     h_state 4 { 'Number' }
  127.     h_trans { 0, '$', '', 'Normal' }
  128.     h_trans { 0, 's', 'Hh', 'Number' }
  129.     h_trans { 0, '-S', '0-9A-Fa-f', 'Number' }
  130.  
  131.     h_state 5 { 'Normal' }
  132.     h_trans { 0, '$', '', 'Normal' }
  133.     h_wtype { 0, 0, 0, 'i', 'a-zA-Z0-9_$@' }
  134.  
  135. }
  136.  
  137. mode ASM51: PLAIN {      # C/C++ Mode
  138.     FileNameRx          = /\.\c{a51}}$/;
  139.     HilitOn             = 1;
  140.     Colorizer           = 'ASM51';
  141.     AutoIndent          = 1;
  142.     IndentMode          = 'C';
  143.     TabSize             = 8; # think twice before changing this, historically
  144.                              # it's been known to cause a mess in sources ;-)
  145.     SpaceTabs           = 0;
  146.     MatchCase           = 1;
  147.     Trim                = 1;
  148.     MultiLineHilit      = 1;
  149.     AutoHilitParen      = 1;
  150.     
  151. #    RoutineRegexp       = /^\w[\w_:*&~]+[\w\\s_:*&~]@\(.*\){\s*\{}?\s*$/;
  152.     RoutineRegexp       = /^\w[\w_:*&~]+[\w\s_:*&~]@\([^;]*$/;
  153. #    RoutineRx      ^\w[\w_:*&]+[\w\s_:*&]@\(
  154. #    RoutineRx      ^{[a-zA-Z0-9_:*&]#\s*}+\(
  155.     
  156.     SaveFolds           = 2;      # save fold info at end of line
  157.     CommentStart        = ' ;';
  158.     CommentEnd          = '';
  159. }
  160.