|
1 <?php |
|
2 /************************************************************************************* |
|
3 * asm.php |
|
4 * ------- |
|
5 * Author: Tux (tux@inmail.cz) |
|
6 * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) |
|
7 * Release Version: 1.0.7.20 |
|
8 * Date Started: 2004/07/27 |
|
9 * |
|
10 * x86 Assembler language file for GeSHi. |
|
11 * Words are from SciTe configuration file (based on NASM syntax) |
|
12 * |
|
13 * CHANGES |
|
14 * ------- |
|
15 * 2004/11/27 (1.0.2) |
|
16 * - Added support for multiple object splitters |
|
17 * 2004/10/27 (1.0.1) |
|
18 * - Added support for URLs |
|
19 * - Added binary and hexadecimal regexps |
|
20 * 2004/08/05 (1.0.0) |
|
21 * - First Release |
|
22 * |
|
23 * TODO (updated 2004/11/27) |
|
24 * ------------------------- |
|
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 |
|
46 $language_data = array ( |
|
47 'LANG_NAME' => 'ASM', |
|
48 'COMMENT_SINGLE' => array(1 => ';'), |
|
49 'COMMENT_MULTI' => array(), |
|
50 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
|
51 'QUOTEMARKS' => array("'", '"'), |
|
52 'ESCAPE_CHAR' => '', |
|
53 'KEYWORDS' => array( |
|
54 /*CPU*/ |
|
55 1 => array( |
|
56 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp', |
|
57 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc', |
|
58 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp', |
|
59 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz', |
|
60 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop', |
|
61 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov', |
|
62 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf', |
|
63 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw', |
|
64 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat', |
|
65 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw', |
|
66 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr', |
|
67 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf', |
|
68 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd', |
|
69 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae', |
|
70 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe', |
|
71 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp', |
|
72 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock', |
|
73 'rep','repe','repne','repnz','repz' |
|
74 ), |
|
75 /*FPU*/ |
|
76 2 => array( |
|
77 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp', |
|
78 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv', |
|
79 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1', |
|
80 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul', |
|
81 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv', |
|
82 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave', |
|
83 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp', |
|
84 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1', |
|
85 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos', |
|
86 'fstenvd','fucom','fucomp','fucompp' |
|
87 ), |
|
88 /*registers*/ |
|
89 3 => array( |
|
90 'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl', |
|
91 'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx', |
|
92 'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7', 'ah', 'bh', 'ch', 'dh' |
|
93 ), |
|
94 /*Directive*/ |
|
95 4 => array( |
|
96 '186','286','286c','286p','287','386','386c','386p','387','486','486p', |
|
97 '8086','8087','alpha','break','code','const','continue','cref','data','data?', |
|
98 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', |
|
99 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', |
|
100 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', |
|
101 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', |
|
102 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', |
|
103 'startup','tfcond','type','until','untilcxz','while','xall','xcref', |
|
104 'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dosseg','dq', |
|
105 'dt','dup','dw','echo','else','elseif','elseif1','elseif2','elseifb','elseifdef','elseifdif', |
|
106 'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end', |
|
107 'endif','endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for', |
|
108 'forc','ge','goto','group','high','highword','if','if1','if2','ifb','ifdef','ifdif', |
|
109 'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke', |
|
110 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', |
|
111 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', |
|
112 'page','popcontext','proc','proto','ptr','public','purge','pushcontext','record', |
|
113 'repeat','rept','seg','segment','short','size','sizeof','sizestr','struc','struct', |
|
114 'substr','subtitle','subttl','textequ','this','title','type','typedef','union','while','width', |
|
115 '.model', '.stack', '.code', '.data' |
|
116 |
|
117 ), |
|
118 |
|
119 /*Operands*/ |
|
120 5 => array( |
|
121 '@b','@f','addr','basic','byte','c','carry?','dword', |
|
122 'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword', |
|
123 'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte', |
|
124 'vararg','word','zero?','flat','near32','far32', |
|
125 'abs','all','assumes','at','casemap','common','compact', |
|
126 'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack','flat', |
|
127 'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory', |
|
128 'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique', |
|
129 'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing', |
|
130 'notpublic','oldmacros','oldstructs','os_dos','para','private','prologue','radix', |
|
131 'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses' |
|
132 ) |
|
133 ), |
|
134 'SYMBOLS' => array( |
|
135 '[', ']', '(', ')' |
|
136 ), |
|
137 'CASE_SENSITIVE' => array( |
|
138 GESHI_COMMENTS => true, |
|
139 1 => false, |
|
140 2 => false, |
|
141 3 => false, |
|
142 4 => false, |
|
143 5 => false |
|
144 ), |
|
145 'STYLES' => array( |
|
146 'KEYWORDS' => array( |
|
147 1 => 'color: #00007f;', |
|
148 2 => 'color: #0000ff;', |
|
149 3 => 'color: #46aa03; font-weight:bold;', |
|
150 4 => 'color: #0000ff;', |
|
151 5 => 'color: #0000ff;' |
|
152 ), |
|
153 'COMMENTS' => array( |
|
154 1 => 'color: #adadad; font-style: italic;', |
|
155 ), |
|
156 'ESCAPE_CHAR' => array( |
|
157 0 => 'color: #000099; font-weight: bold;' |
|
158 ), |
|
159 'BRACKETS' => array( |
|
160 0 => 'color: #66cc66;' |
|
161 ), |
|
162 'STRINGS' => array( |
|
163 0 => 'color: #7f007f;' |
|
164 ), |
|
165 'NUMBERS' => array( |
|
166 0 => 'color: #ff0000;' |
|
167 ), |
|
168 'METHODS' => array( |
|
169 ), |
|
170 'SYMBOLS' => array( |
|
171 0 => 'color: #66cc66;' |
|
172 ), |
|
173 'REGEXPS' => array( |
|
174 0 => 'color: #ff0000;', |
|
175 1 => 'color: #ff0000;' |
|
176 ), |
|
177 'SCRIPT' => array( |
|
178 ) |
|
179 ), |
|
180 'URLS' => array( |
|
181 1 => '', |
|
182 2 => '' |
|
183 ), |
|
184 'OOLANG' => false, |
|
185 'OBJECT_SPLITTERS' => array( |
|
186 ), |
|
187 'REGEXPS' => array( |
|
188 0 => '0[0-9a-fA-F]{1,32}[hH]', |
|
189 1 => '[01]{1,64}[bB]' |
|
190 ), |
|
191 'STRICT_MODE_APPLIES' => GESHI_NEVER, |
|
192 'SCRIPT_DELIMITERS' => array( |
|
193 ), |
|
194 'HIGHLIGHT_STRICT_BLOCK' => array( |
|
195 ), |
|
196 'TAB_WIDTH' => 8 |
|
197 ); |
|
198 |
|
199 ?> |