| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<!-- |
| 4 |
|
| 5 |
************************************************************************* |
| 6 |
* * |
| 7 |
* Syntax highlighting for the AVR Assembler * |
| 8 |
* Copyright (C) 2004, Roland Nagy * |
| 9 |
* * |
| 10 |
************************************************************************* |
| 11 |
|
| 12 |
Author: Rolanf Nagy <[email protected]> |
| 13 |
Date: 18th May, 2004 |
| 14 |
Version: 1.0 |
| 15 |
|
| 16 |
This file contains the XML syntax highlighting description for the AVR |
| 17 |
Assembler, for KATE, the KDE Advanced Editor. Keywords have been taken |
| 18 |
directly from the AVR Assembler source code. |
| 19 |
|
| 20 |
This program, including associated files, is free software. You may |
| 21 |
distribute it and/or modify it under the terms of the GNU General Public |
| 22 |
License as published by the Free Software Foundation; either Version 2 of |
| 23 |
the license, or (at your option) any later version. |
| 24 |
|
| 25 |
This program is distributed in the hope that it will be useful, but |
| 26 |
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 27 |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 28 |
for more details. |
| 29 |
|
| 30 |
You should have received a copy of the GNU General Public License along |
| 31 |
with this program; if not, write to the Free Software Foundation, Inc., |
| 32 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 33 |
|
| 34 |
--> |
| 35 |
|
| 36 |
<language name="AVR Assembler" version="6" kateversion="5.62" section="Assembler" extensions="*.asm;*.ASM;*.asm-avr" mimetype="text/x-asm;text/x-asm-avr" author="Roland Nagy" license="GPLv2+"> |
| 37 |
<highlighting> |
| 38 |
<list name="keywords"> |
| 39 |
<item>adc</item> |
| 40 |
<item>add</item> |
| 41 |
<item>adiw</item> |
| 42 |
<item>and</item> |
| 43 |
<item>andi</item> |
| 44 |
<item>asr</item> |
| 45 |
<item>bclr</item> |
| 46 |
<item>bld</item> |
| 47 |
<item>break</item> |
| 48 |
<item>bset</item> |
| 49 |
<item>bst</item> |
| 50 |
<item>cbi</item> |
| 51 |
<item>cbr</item> |
| 52 |
<item>clc</item> |
| 53 |
<item>clh</item> |
| 54 |
<item>cli</item> |
| 55 |
<item>cln</item> |
| 56 |
<item>clr</item> |
| 57 |
<item>cls</item> |
| 58 |
<item>clt</item> |
| 59 |
<item>clv</item> |
| 60 |
<item>clz</item> |
| 61 |
<item>com</item> |
| 62 |
<item>dec</item> |
| 63 |
<item>des</item> |
| 64 |
<item>elpm</item> |
| 65 |
<item>eor</item> |
| 66 |
<item>fmul</item> |
| 67 |
<item>fmuls</item> |
| 68 |
<item>fmulsu</item> |
| 69 |
<item>in</item> |
| 70 |
<item>inc</item> |
| 71 |
<item>lac</item> |
| 72 |
<item>las</item> |
| 73 |
<item>lat</item> |
| 74 |
<item>ld</item> |
| 75 |
<item>ldd</item> |
| 76 |
<item>ldi</item> |
| 77 |
<item>lds</item> |
| 78 |
<item>lpm</item> |
| 79 |
<item>lsl</item> |
| 80 |
<item>lsr</item> |
| 81 |
<item>mov</item> |
| 82 |
<item>movw</item> |
| 83 |
<item>mul</item> |
| 84 |
<item>muls</item> |
| 85 |
<item>mulsu</item> |
| 86 |
<item>neg</item> |
| 87 |
<item>nop</item> |
| 88 |
<item>or</item> |
| 89 |
<item>ori</item> |
| 90 |
<item>out</item> |
| 91 |
<item>pop</item> |
| 92 |
<item>push</item> |
| 93 |
<item>rol</item> |
| 94 |
<item>ror</item> |
| 95 |
<item>sbc</item> |
| 96 |
<item>sbr</item> |
| 97 |
<item>sec</item> |
| 98 |
<item>seh</item> |
| 99 |
<item>sbi</item> |
| 100 |
<item>sbci</item> |
| 101 |
<item>sbiw</item> |
| 102 |
<item>sei</item> |
| 103 |
<item>sen</item> |
| 104 |
<item>ser</item> |
| 105 |
<item>ses</item> |
| 106 |
<item>set</item> |
| 107 |
<item>sev</item> |
| 108 |
<item>sez</item> |
| 109 |
<item>sleep</item> |
| 110 |
<item>spm</item> |
| 111 |
<item>st</item> |
| 112 |
<item>std</item> |
| 113 |
<item>sts</item> |
| 114 |
<item>sub</item> |
| 115 |
<item>subi</item> |
| 116 |
<item>swap</item> |
| 117 |
<item>tst</item> |
| 118 |
<item>wdr</item> |
| 119 |
<item>xch</item> |
| 120 |
</list> |
| 121 |
|
| 122 |
<list name="branch instructions"> |
| 123 |
<item>brbc</item> |
| 124 |
<item>brbs</item> |
| 125 |
<item>brcc</item> |
| 126 |
<item>brcs</item> |
| 127 |
<item>breq</item> |
| 128 |
<item>brge</item> |
| 129 |
<item>brhc</item> |
| 130 |
<item>brhs</item> |
| 131 |
<item>brid</item> |
| 132 |
<item>brie</item> |
| 133 |
<item>brlo</item> |
| 134 |
<item>brlt</item> |
| 135 |
<item>brmi</item> |
| 136 |
<item>brne</item> |
| 137 |
<item>brpl</item> |
| 138 |
<item>brsh</item> |
| 139 |
<item>brtc</item> |
| 140 |
<item>brts</item> |
| 141 |
<item>brvc</item> |
| 142 |
<item>brvs</item> |
| 143 |
<item>call</item> |
| 144 |
<item>cp</item> |
| 145 |
<item>cpc</item> |
| 146 |
<item>cpi</item> |
| 147 |
<item>cpse</item> |
| 148 |
<item>eicall</item> |
| 149 |
<item>eijmp</item> |
| 150 |
<item>icall</item> |
| 151 |
<item>ijmp</item> |
| 152 |
<item>jmp</item> |
| 153 |
<item>rcall</item> |
| 154 |
<item>ret</item> |
| 155 |
<item>reti</item> |
| 156 |
<item>rjmp</item> |
| 157 |
<item>sbic</item> |
| 158 |
<item>sbis</item> |
| 159 |
<item>sbrc</item> |
| 160 |
<item>sbrs</item> |
| 161 |
</list> |
| 162 |
|
| 163 |
<list name="directives"> |
| 164 |
<item>.byte</item> |
| 165 |
<item>.cseg</item> |
| 166 |
<item>.csegsize</item> |
| 167 |
<item>.db</item> |
| 168 |
<item>.dd</item> |
| 169 |
<item>.def</item> |
| 170 |
<item>.dq</item> |
| 171 |
<item>.dseg</item> |
| 172 |
<item>.dw</item> |
| 173 |
<item>.elif</item> |
| 174 |
<item>.else</item> |
| 175 |
<item>.endif</item> |
| 176 |
<item>.endm</item> |
| 177 |
<item>.endmacro</item> |
| 178 |
<item>.equ</item> |
| 179 |
<item>.error</item> |
| 180 |
<item>.esec</item> |
| 181 |
<item>.exit</item> |
| 182 |
<item>.if</item> |
| 183 |
<item>.ifdef</item> |
| 184 |
<item>.ifndef</item> |
| 185 |
<item>.include</item> |
| 186 |
<item>.list</item> |
| 187 |
<item>.listmac</item> |
| 188 |
<item>.macro</item> |
| 189 |
<item>.message</item> |
| 190 |
<item>.nolist</item> |
| 191 |
<item>.nooverlap</item> |
| 192 |
<item>.org</item> |
| 193 |
<item>.overlap</item> |
| 194 |
<item>.set</item> |
| 195 |
<item>.undef</item> |
| 196 |
<item>.warning</item> |
| 197 |
</list> |
| 198 |
|
| 199 |
<list name="functions"> |
| 200 |
<item>low</item> |
| 201 |
<item>high</item> |
| 202 |
<item>byte2</item> |
| 203 |
<item>byte3</item> |
| 204 |
<item>byte4</item> |
| 205 |
<item>lwrd</item> |
| 206 |
<item>hwrd</item> |
| 207 |
<item>page</item> |
| 208 |
<item>exp2</item> |
| 209 |
<item>log2</item> |
| 210 |
<item>int</item> |
| 211 |
<item>frac</item> |
| 212 |
<item>q7</item> |
| 213 |
<item>q15</item> |
| 214 |
<item>abs</item> |
| 215 |
<item>defined</item> |
| 216 |
<item>strlen</item> |
| 217 |
</list> |
| 218 |
|
| 219 |
<list name="constants"> |
| 220 |
<item>__AVRASM_VERSION__</item> |
| 221 |
<item>__CORE_VERSION__</item> |
| 222 |
<item>__DATE__</item> |
| 223 |
<item>__TIME__</item> |
| 224 |
<item>__CENTURY__</item> |
| 225 |
<item>__YEAR__</item> |
| 226 |
<item>__MONTH__</item> |
| 227 |
<item>__FILE__</item> |
| 228 |
<item>__LINE__</item> |
| 229 |
<item>__SECOND__</item> |
| 230 |
<item>__MINUTE__</item> |
| 231 |
<item>__HOUR__</item> |
| 232 |
<item>__DAY__</item> |
| 233 |
<item>__PART_NAME__</item> |
| 234 |
</list> |
| 235 |
|
| 236 |
<list name="macros"> |
| 237 |
<item>#define</item> |
| 238 |
<item>#if</item> |
| 239 |
<item>#undef</item> |
| 240 |
<item>#idef</item> |
| 241 |
<item>#ifndef</item> |
| 242 |
<item>#if</item> |
| 243 |
<item>#elif</item> |
| 244 |
<item>#else</item> |
| 245 |
<item>#endif</item> |
| 246 |
<item>#error</item> |
| 247 |
<item>#warning</item> |
| 248 |
<item>#message</item> |
| 249 |
<item>#include</item> |
| 250 |
<item>#pragma</item> |
| 251 |
</list> |
| 252 |
|
| 253 |
<contexts> |
| 254 |
<context attribute="Normal Text" lineEndContext="#stay" name="Normal"> |
| 255 |
<DetectSpaces attribute="Normal Text" /> |
| 256 |
<DetectChar attribute="Decimal" context="Number" char="0" lookAhead="1" /> |
| 257 |
<Int attribute="Decimal" context="Decimal" /> |
| 258 |
<DetectChar attribute="Directive" context="Directive" char="." lookAhead="1"/> |
| 259 |
<DetectChar attribute="Hex" context="Hex" char="$" /> |
| 260 |
<DetectChar attribute="Referred Macro Parameter" context="RefMacroParam" char="@" lookAhead="1" /> |
| 261 |
<HlCChar attribute="Char" context="#stay" /> |
| 262 |
<DetectChar attribute="String" context="String" char=""" /> |
| 263 |
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="*" beginRegion="BlockComment" /> |
| 264 |
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="/" /> |
| 265 |
<DetectChar attribute="Comment" context="Commentar 2" char=";" /> |
| 266 |
<AnyChar attribute="Symbol" context="#stay" String="!~-*/%+-<>=&^|?,()\" /> |
| 267 |
<DetectChar attribute="Preprocessor" context="Preprocessor" char="#" firstNonSpace="1" lookAhead="1"/> |
| 268 |
<RegExpr attribute="Label" context="#stay" String="[A-Za-z0-9_]+:" firstNonSpace="1"/> |
| 269 |
<keyword attribute="Keyword" context="#stay" String="keywords"/> |
| 270 |
<keyword attribute="Branch Instructions" context="#stay" String="branch instructions"/> |
| 271 |
<keyword attribute="Function" context="#stay" String="functions"/> |
| 272 |
<RegExpr context="#stay" String="[A-Za-z_.$][A-Za-z0-9_.$]*" /> |
| 273 |
</context> |
| 274 |
|
| 275 |
<context attribute="Referred Macro Parameter" lineEndContext="#pop" name="RefMacroParam"> |
| 276 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="0" /> |
| 277 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="1" /> |
| 278 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="2" /> |
| 279 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="3" /> |
| 280 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="4" /> |
| 281 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="5" /> |
| 282 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="6" /> |
| 283 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="7" /> |
| 284 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="8" /> |
| 285 |
<Detect2Chars attribute="Referred Macro Parameter" context="#pop" char="@" char1="9" /> |
| 286 |
<DetectChar attribute="Error" context="#pop" char="@" /> |
| 287 |
</context> |
| 288 |
|
| 289 |
<context attribute="Directive" lineEndContext="#pop" name="Directive" fallthroughContext="#pop!BadDirective"> |
| 290 |
<keyword attribute="Directive" context="#pop" String="directives" insensitive="1" /> |
| 291 |
</context> |
| 292 |
|
| 293 |
<context attribute="Error" lineEndContext="#pop" name="BadDirective" fallthroughContext="#pop"> |
| 294 |
<DetectChar attribute="Error" context="#stay" char="." /> |
| 295 |
<DetectIdentifier attribute="Error" context="#pop" /> |
| 296 |
</context> |
| 297 |
|
| 298 |
<context attribute="Decimal" lineEndContext="#pop" name="Number"> |
| 299 |
<StringDetect attribute="Hex" context="#pop!Hex" String="0x" insensitive="1" /> |
| 300 |
<StringDetect attribute="Binary" context="#pop!Binary" String="0b" insensitive="1" /> |
| 301 |
<StringDetect attribute="Float" context="#pop!Float" String="0f" insensitive="1" /> |
| 302 |
<StringDetect attribute="Float" context="#pop!Float" String="0e" insensitive="1" /> |
| 303 |
<StringDetect attribute="Float" context="#pop!Float" String="0d" insensitive="1" /> |
| 304 |
<WordDetect attribute="Decimal" context="#pop" String="0" /> |
| 305 |
<DetectChar attribute="Octal" context="#pop!Octal" char="0" /> |
| 306 |
</context> |
| 307 |
|
| 308 |
<context attribute="Decimal" lineEndContext="#pop" name="Decimal" fallthroughContext="#pop"> |
| 309 |
<AnyChar attribute="Decimal" context="#stay" String="0123456789_" /> |
| 310 |
</context> |
| 311 |
|
| 312 |
<context attribute="Binary" lineEndContext="#pop" name="Binary" fallthroughContext="#pop"> |
| 313 |
<AnyChar attribute="Binary" context="#stay" String="01_" /> |
| 314 |
</context> |
| 315 |
|
| 316 |
<context attribute="Octal" lineEndContext="#pop" name="Octal" fallthroughContext="#pop"> |
| 317 |
<AnyChar attribute="Octal" context="#stay" String="01234567_" /> |
| 318 |
</context> |
| 319 |
|
| 320 |
<context attribute="Hex" lineEndContext="#pop" name="Hex" fallthroughContext="#pop"> |
| 321 |
<AnyChar attribute="Hex" context="#stay" String="0123456789abcdefABCDEF_" /> |
| 322 |
</context> |
| 323 |
|
| 324 |
<context attribute="Float" lineEndContext="#pop" name="Float" fallthroughContext="#pop"> |
| 325 |
<RegExpr attribute="Float" context="#stay" String="[-+]?[0-9]*+\.?[0-9]*+[eE]?[-+]?[0-9]+" /> |
| 326 |
</context> |
| 327 |
|
| 328 |
<context attribute="String" lineEndContext="#pop" name="String"> |
| 329 |
<LineContinue attribute="Symbol" /> |
| 330 |
<HlCStringChar attribute="String Char" context="#stay" /> |
| 331 |
<DetectChar attribute="String" context="#pop" char=""" /> |
| 332 |
</context> |
| 333 |
|
| 334 |
<context attribute="Comment" lineEndContext="#stay" name="Commentar 1"> |
| 335 |
<DetectSpaces attribute="Comment"/> |
| 336 |
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="BlockComment" /> |
| 337 |
<IncludeRules context="##Comments"/> |
| 338 |
<DetectIdentifier attribute="Comment"/> |
| 339 |
</context> |
| 340 |
<context attribute="Comment" lineEndContext="#pop" name="Commentar 2"> |
| 341 |
<DetectSpaces attribute="Comment"/> |
| 342 |
<IncludeRules context="##Comments"/> |
| 343 |
<DetectIdentifier attribute="Comment"/> |
| 344 |
</context> |
| 345 |
|
| 346 |
<context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor"> |
| 347 |
<keyword attribute="Preprocessor" context="#pop!InPreprocessor" String="macros" /> |
| 348 |
<DetectChar attribute="Preprocessor" context="#pop!PreprocessorName" char="#" /> |
| 349 |
</context> |
| 350 |
<context attribute="Preprocessor" lineEndContext="#pop" name="PreprocessorName"> |
| 351 |
<DetectIdentifier attribute="Unknown Preprocessor" context="#pop!InPreprocessor" /> |
| 352 |
</context> |
| 353 |
|
| 354 |
<context attribute="Preprocessor" lineEndContext="#pop" name="InPreprocessor"> |
| 355 |
<LineContinue attribute="Symbol" /> |
| 356 |
<DetectChar attribute="Symbol" context="#stay" char="#" /> |
| 357 |
<Detect2Chars attribute="Constant" context="Constant" char="_" char1="_" lookAhead="1"/> |
| 358 |
<IncludeRules context="Normal" /> |
| 359 |
</context> |
| 360 |
|
| 361 |
<context attribute="Constant" lineEndContext="#stay" name="Constant"> |
| 362 |
<keyword attribute="Constant" context="#pop" String="constants"/> |
| 363 |
<RegExpr attribute="Constant" context="#pop" String="__(?:[0-9a-zA-Z]++|_(?!_))++__" /> |
| 364 |
<DetectIdentifier attribute="Error" context="#pop" /> |
| 365 |
</context> |
| 366 |
</contexts> |
| 367 |
|
| 368 |
<itemDatas> |
| 369 |
<itemData name="Normal Text" defStyleNum="dsNormal" /> |
| 370 |
<itemData name="Label" defStyleNum="dsFunction" /> |
| 371 |
<itemData name="Function" defStyleNum="dsFunction" /> |
| 372 |
<itemData name="Keyword" defStyleNum="dsKeyword" /> |
| 373 |
<itemData name="Branch Instructions" defStyleNum="dsControlFlow" /> |
| 374 |
<itemData name="Directive" defStyleNum="dsKeyword" /> |
| 375 |
<itemData name="Decimal" defStyleNum="dsDecVal" /> |
| 376 |
<itemData name="Octal" defStyleNum="dsBaseN" /> |
| 377 |
<itemData name="Hex" defStyleNum="dsBaseN" /> |
| 378 |
<itemData name="Binary" defStyleNum="dsBaseN" /> |
| 379 |
<itemData name="Float" defStyleNum="dsFloat" /> |
| 380 |
<itemData name="Char" defStyleNum="dsChar" /> |
| 381 |
<itemData name="String" defStyleNum="dsString" /> |
| 382 |
<itemData name="String Char" defStyleNum="dsSpecialChar" /> |
| 383 |
<itemData name="Symbol" defStyleNum="dsOperator" /> |
| 384 |
<itemData name="Comment" defStyleNum="dsComment" /> |
| 385 |
<itemData name="Preprocessor" defStyleNum="dsPreprocessor" /> |
| 386 |
<itemData name="Constant" defStyleNum="dsOthers" /> |
| 387 |
<itemData name="Error" defStyleNum="dsError" /> |
| 388 |
<itemData name="Unknown Preprocessor" defStyleNum="dsError" /> |
| 389 |
<itemData name="Referred Macro Parameter" defStyleNum="dsVariable" /> |
| 390 |
</itemDatas> |
| 391 |
</highlighting> |
| 392 |
|
| 393 |
<general> |
| 394 |
<comments> |
| 395 |
<comment name="singleLine" start=";" /> |
| 396 |
<comment name="multiLine" start="/*" end="*/" region="BlockComment" /> |
| 397 |
</comments> |
| 398 |
<keywords casesensitive="1" weakDeliminator=".$#" /> |
| 399 |
</general> |
| 400 |
</language> |
| 401 |
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; --> |