<?xml version="1.0" encoding="UTF-8"?>
<!--

 Author: Callum Lowcay <callum@callumscode.com>
 Copyright (C) 2008-2010 Callum Lowcay

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public
 License as published by the Free Software Foundation; either
 version 2 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Library General Public License for more details.

 You should have received a copy of the GNU Library General Public
 License along with this library; if not, write to the
 Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 Boston, MA 02111-1301, USA.

-->
<!--
	Mostly copied and pasted from c.lang
-->
<language id="nasm" _name="NASM" version="2.0" _section="Others">
    <metadata>
      <property name="mimetypes">text/x-x86asm</property><!--Just a guess-->
      <property name="globs">*.asm</property>
      <property name="line-comment-start">;</property>
    </metadata>

    <styles>
        <style id="comment"           _name="Comment"             map-to="def:comment"/>
        <style id="error"             _name="Error"               map-to="def:error"/>
        <style id="string"            _name="String"              map-to="def:string"/>
        <style id="preprocessor"      _name="Preprocessor"        map-to="def:preprocessor"/>
        <style id="opcode"            _name="Opcode"              map-to="def:keyword"/>
        <style id="register"          _name="Register"            map-to="def:identifier"/>
        <style id="type"              _name="Data Type"           map-to="def:type"/>
        <style id="escaped-character" _name="Escaped Character"   map-to="def:special-char"/>
        <style id="floating-point"    _name="Floating point number" map-to="def:floating-point"/>
        <style id="decimal"           _name="Decimal number"      map-to="def:decimal"/>
        <style id="octal"             _name="Octal number"        map-to="def:base-n-integer"/>
        <style id="hexadecimal"       _name="Hexadecimal number"  map-to="def:base-n-integer"/>
        <style id="binary"            _name="Binary number"       map-to="def:base-n-integer"/>
    </styles>
    
    <default-regex-options case-sensitive="false"/>

    <definitions>
        <define-regex id="escaped-character" extended="true">
            \\(      # leading backslash
            [\\\"\'] # escaped character
            )
        </define-regex>

        <context id="nasm">
            <include>
                <!-- Comments -->
                <context id="comment" style-ref="comment" end-at-line-end="true">
                    <start>;</start>
                    <include>
                      <context ref="def:in-line-comment"/>
                    </include>
                </context>

                <context id="string" style-ref="string" end-at-line-end="true">
                    <start>"</start>
                    <end>"</end>
                    <include>
                        <context id="escaped-characterw" style-ref="escaped-character">
                            <match>\%{escaped-character}</match>
                        </context>
                    </include>
                </context>
                <context id="string2" style-ref="string" end-at-line-end="true">
                    <start>'</start>
                    <end>'</end>
                    <include>
                        <context id="escaped-characters" style-ref="escaped-character">
                            <match>\%{escaped-character}</match>
                        </context>
                    </include>
                </context>


                <context id="float" style-ref="floating-point">
                    <match extended="true">
                        (?&lt;![\w\.])
                        ((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
                        ([0-9]+[Ee][+-]?[0-9]*))
                        (?![\w\.])
                    </match>
                </context>

                <context id="hexadecimal" style-ref="hexadecimal">
                    <match extended="true">
                        (?&lt;![\w\.])
                        ((0[xX][a-fA-F0-9]+)|([0-9][a-fA-F0-9]*h)|(\$[0-9][a-fA-F0-9]+))
                        (?![\w\.])
                    </match>
                </context>

                <context id="octal" style-ref="octal">
                    <match extended="true">
                        (?&lt;![\w\.])
                        [0-7]+[QOqo]
                        (?![\w\.])
                    </match>
                </context>

                <context id="decimal" style-ref="decimal">
                    <match extended="true">
                        (?&lt;![\w\.])
                        [0-9]+
                        (?![\w\.])
                    </match>
                </context>

                <context id="binary" style-ref="binary">
                    <match extended="true">
                        (?&lt;![\w\.])
                        [01]+[Bb]
                        (?![\w\.])
                    </match>
                </context>

                <!-- Opcodes -->
                <context id="opcodes_simple" style-ref="opcode">
<!--Prefixes-->
<keyword>REP</keyword><keyword>REPE</keyword><keyword>REPZ</keyword><keyword>REPNE</keyword>
<keyword>REPNZ</keyword><keyword>LOCK</keyword>
<!--Core Opcodes-->
<keyword>AAA</keyword><keyword>AAD</keyword><keyword>AAM</keyword><keyword>AAS</keyword>
<keyword>ADC</keyword><keyword>ADD</keyword><keyword>AND</keyword><keyword>BOUND</keyword>
<keyword>BSF</keyword><keyword>BSR</keyword><keyword>BSWAP</keyword><keyword>BT</keyword>
<keyword>BTC</keyword><keyword>BTR</keyword><keyword>BTS</keyword><keyword>CALL</keyword>
<keyword>CBW</keyword><keyword>CWDE</keyword><keyword>CDQE</keyword><keyword>CWD</keyword>
<keyword>CDQ</keyword><keyword>CQO</keyword><keyword>CLC</keyword><keyword>CLD</keyword>
<keyword>CLFLUSH</keyword><keyword>CMC</keyword><keyword>CMP</keyword><keyword>CMPS</keyword>
<keyword>CMPSB</keyword><keyword>CMPSW</keyword><keyword>CMPSD</keyword><keyword>CMPSQ</keyword>
<keyword>CMPXCHG</keyword><keyword>CMPXCHG8B</keyword><keyword>CMPXCHG16B</keyword><keyword>CPUID</keyword>
<keyword>DAA</keyword><keyword>DAS</keyword><keyword>DEC</keyword><keyword>DIV</keyword>
<keyword>ENTER</keyword><keyword>IDIV</keyword><keyword>IMUL</keyword><keyword>IN</keyword>
<keyword>INC</keyword><keyword>INS</keyword><keyword>INSB</keyword><keyword>INSW</keyword>
<keyword>INSD</keyword><keyword>INT</keyword><keyword>INTO</keyword><keyword>JCXZ</keyword>
<keyword>JECXZ</keyword><keyword>JRCXZ</keyword><keyword>JMP</keyword><keyword>LAHF</keyword>
<keyword>LDS</keyword><keyword>LES</keyword><keyword>LFS</keyword><keyword>LGS</keyword>
<keyword>LSS</keyword><keyword>LEA</keyword><keyword>LEAVE</keyword><keyword>FENCE</keyword>
<keyword>LODS</keyword><keyword>LODSB</keyword><keyword>LODSW</keyword><keyword>LODSD</keyword>
<keyword>LODSQ</keyword><keyword>LOOP</keyword><keyword>LOOPE</keyword><keyword>LOOPNE</keyword>
<keyword>LOOPNZ</keyword><keyword>LOOPZ</keyword><keyword>LZCNT</keyword><keyword>MFENCE</keyword>
<keyword>MOV</keyword><keyword>MOVD</keyword><keyword>MOVMSKPD</keyword><keyword>MOVMSKPS</keyword>
<keyword>MOVNTI</keyword><keyword>MOVS</keyword><keyword>MOVSB</keyword><keyword>MOVSW</keyword>
<keyword>MOVSD</keyword><keyword>MOVSQ</keyword><keyword>MOVSX</keyword><keyword>MOVSXD</keyword>
<keyword>MOVZX</keyword><keyword>MUL</keyword><keyword>NEG</keyword><keyword>NOP</keyword>
<keyword>NOT</keyword><keyword>OR</keyword><keyword>OUT</keyword><keyword>OUTS</keyword>
<keyword>OUTSB</keyword><keyword>OUTSW</keyword><keyword>OUTSD</keyword><keyword>PAUSE</keyword>
<keyword>POP</keyword><keyword>POPA</keyword><keyword>POPAD</keyword><keyword>POPCNT</keyword>
<keyword>POPF</keyword><keyword>POPFD</keyword><keyword>POPFQ</keyword><keyword>PREFETCH</keyword>
<keyword>PREFETCHW</keyword><keyword>PREDETCHNTA</keyword><keyword>PREDETCHT0</keyword><keyword>PREDETCHT1</keyword>
<keyword>PREDETCHT2</keyword><keyword>PUSH</keyword><keyword>PUSHA</keyword><keyword>PUSHAD</keyword>
<keyword>PUSHF</keyword><keyword>PUSHFD</keyword><keyword>PUSHFQ</keyword><keyword>RCL</keyword>
<keyword>RCR</keyword><keyword>RET</keyword><keyword>ROL</keyword><keyword>ROR</keyword>
<keyword>SAHF</keyword><keyword>SAL</keyword><keyword>SHL</keyword><keyword>SAR</keyword>
<keyword>SBB</keyword><keyword>SCAS</keyword><keyword>SCASB</keyword><keyword>SCASW</keyword>
<keyword>SCASD</keyword><keyword>SCASQ</keyword><keyword>SFENCE</keyword><keyword>SHL</keyword>
<keyword>SHLD</keyword><keyword>SHR</keyword><keyword>SHRD</keyword><keyword>STC</keyword>
<keyword>STD</keyword><keyword>STOS</keyword><keyword>STOSB</keyword><keyword>STOSW</keyword>
<keyword>STOSD</keyword><keyword>STOSQ</keyword><keyword>SUB</keyword><keyword>TEST</keyword>
<keyword>XADD</keyword><keyword>XCHG</keyword><keyword>XLAT</keyword><keyword>XOR</keyword>
<!--System opcodes-->
<keyword>ARPL</keyword><keyword>CLGI</keyword><keyword>CLI</keyword><keyword>CLTS</keyword>
<keyword>HLT</keyword><keyword>INT</keyword><keyword>INVD</keyword><keyword>INVLPG</keyword>
<keyword>INVLPGA</keyword><keyword>IRET</keyword><keyword>IRETD</keyword><keyword>IRETQ</keyword>
<keyword>LAR</keyword><keyword>LGDT</keyword><keyword>LIDT</keyword><keyword>LLDT</keyword>
<keyword>LMSW</keyword><keyword>LSL</keyword><keyword>LTR</keyword><keyword>MONITOR</keyword>
<keyword>MWAIT</keyword><keyword>RDMSR</keyword><keyword>RDPMC</keyword><keyword>RDTSCP</keyword>
<keyword>RSM</keyword><keyword>SGDT</keyword><keyword>SIDT</keyword><keyword>SKINIT</keyword>
<keyword>SLDT</keyword><keyword>SMSW</keyword><keyword>STI</keyword><keyword>STGI</keyword>
<keyword>STR</keyword><keyword>SWAPGS</keyword><keyword>SYSCALL</keyword><keyword>SYSENTER</keyword>
<keyword>SYSEXIT</keyword><keyword>SYSRET</keyword><keyword>UD2</keyword><keyword>VERR</keyword>
<keyword>VERW</keyword><keyword>VMLOAD</keyword><keyword>VMMCALL</keyword><keyword>VMRUN</keyword>
<keyword>VMSAVE</keyword><keyword>WBINVD</keyword><keyword>WRMSR</keyword>
<!--x87 FPU-->
<keyword>F2XM1</keyword><keyword>FABS</keyword><keyword>FADD</keyword><keyword>FADDP</keyword>
<keyword>FIADD</keyword><keyword>FBLD</keyword><keyword>FBSTP</keyword><keyword>FCHS</keyword>
<keyword>FCLEX</keyword><keyword>FNCLEX</keyword><keyword>FCOM</keyword><keyword>FCOMP</keyword>
<keyword>COMPP</keyword><keyword>COMI</keyword><keyword>FCOMIP</keyword><keyword>FCOS</keyword>
<keyword>FDECSTP</keyword><keyword>FDIV</keyword><keyword>FDIVP</keyword><keyword>FIDIVR</keyword>
<keyword>FFREE</keyword><keyword>FICOM</keyword><keyword>FICOMP</keyword><keyword>FILD</keyword>
<keyword>FINCSTP</keyword><keyword>FINIT</keyword><keyword>FNINIT</keyword><keyword>FIST</keyword>
<keyword>FISTP</keyword><keyword>FISTTP</keyword><keyword>FLD</keyword><keyword>FLD1</keyword>
<keyword>FLDCW</keyword><keyword>FLDENV</keyword><keyword>FLDL2E</keyword><keyword>FLDL2T</keyword>
<keyword>FLDG2</keyword><keyword>FLDN2</keyword><keyword>FLDPI</keyword><keyword>FLDZ</keyword>
<keyword>FMUL</keyword><keyword>FMULP</keyword><keyword>FIMUL</keyword><keyword>FNOP</keyword>
<keyword>FPATAN</keyword><keyword>FPREM</keyword><keyword>FPREM1</keyword><keyword>FPTAN</keyword>
<keyword>FRNDINT</keyword><keyword>FRSTOR</keyword><keyword>FSAVE</keyword><keyword>FNSAVE</keyword>
<keyword>FSCALE</keyword><keyword>FSIN</keyword><keyword>FSINCOS</keyword><keyword>FSQRT</keyword>
<keyword>FST</keyword><keyword>FSTP</keyword><keyword>FSTCW</keyword><keyword>FNSTCW</keyword>
<keyword>FSTENV</keyword><keyword>FNSTENV</keyword><keyword>FSTSW</keyword><keyword>FNSTSW</keyword>
<keyword>FSUB</keyword><keyword>FSUBP</keyword><keyword>FISUB</keyword><keyword>FSUBR</keyword>
<keyword>FSUBRP</keyword><keyword>FISUBR</keyword><keyword>FTST</keyword><keyword>FUCOM</keyword>
<keyword>FUCOMP</keyword><keyword>FUCOMPP</keyword><keyword>FUCOMI</keyword><keyword>FUCOMIP</keyword>
<keyword>FWAIT</keyword><keyword>WAIT</keyword><keyword>FXAM</keyword><keyword>FXCH</keyword>
<keyword>FXRSTOR</keyword><keyword>FXSAVE</keyword><keyword>FXTRACT</keyword><keyword>FYL2X</keyword>
<keyword>FYL2XP1</keyword>
<!--64bit media (MMX, 3DNow!)-->
<keyword>CVTPD2PI</keyword><keyword>CVTPI2PD</keyword><keyword>CVTPI2PS</keyword><keyword>CVTPS2PI</keyword>
<keyword>CVTTPD2PI</keyword><keyword>CVTTPS2PI</keyword><keyword>EMMS</keyword><keyword>FEMMS</keyword>
<keyword>FRSTOR</keyword><keyword>MASKMOVQ</keyword><keyword>MOVD</keyword><keyword>MOVDQ2Q</keyword>
<keyword>MOVNTQ</keyword><keyword>MOVQ</keyword><keyword>MOVQ2DQ</keyword><keyword>PACKSSDW</keyword>
<keyword>PACKSSWB</keyword><keyword>PACKUSWB</keyword><keyword>PADDB</keyword><keyword>PADDD</keyword>
<keyword>PADDQ</keyword><keyword>PADDSB</keyword><keyword>PADDSW</keyword><keyword>PADDUSB</keyword>
<keyword>PADDUSW</keyword><keyword>PADDW</keyword><keyword>PAND</keyword><keyword>PANDN</keyword>
<keyword>PAVGB</keyword><keyword>PAVGUSB</keyword><keyword>PAVGW</keyword><keyword>PCMPGTB</keyword>
<keyword>PCMPGTD</keyword><keyword>PCMPGTW</keyword><keyword>PCMPEQB</keyword><keyword>PCMPEQD</keyword>
<keyword>PCMPEQW</keyword><keyword>PEXTRW</keyword><keyword>PF2ID</keyword><keyword>PF2IW</keyword>
<keyword>PFACC</keyword><keyword>PFADD</keyword><keyword>PFCMPEQ</keyword><keyword>PFCMPGE</keyword>
<keyword>PFCMPGT</keyword><keyword>PFMAX</keyword><keyword>PFMIN</keyword><keyword>PFMUL</keyword>
<keyword>PFNACC</keyword><keyword>PFPNACC</keyword><keyword>PFRCP</keyword><keyword>PFRCPIT1</keyword>
<keyword>PFRCPIT2</keyword><keyword>PFRSQRT</keyword><keyword>PFSUB</keyword><keyword>PFSUBR</keyword>
<keyword>PI2FD</keyword><keyword>PI2FW</keyword><keyword>PINSRW</keyword><keyword>PMADDWD</keyword>
<keyword>PMAXSW</keyword><keyword>PMAXUB</keyword><keyword>PMINSW</keyword><keyword>PMINUB</keyword>
<keyword>PMOVMSKB</keyword><keyword>PMULHRW</keyword><keyword>PMULHUW</keyword><keyword>PMULHW</keyword>
<keyword>PMULLW</keyword><keyword>PMULUQD</keyword><keyword>POR</keyword><keyword>PSADBW</keyword>
<keyword>PSHUFW</keyword><keyword>PSLLD</keyword><keyword>PSLLQ</keyword><keyword>PSLLW</keyword>
<keyword>PSRAD</keyword><keyword>PSRAW</keyword><keyword>PSRLD</keyword><keyword>PSRLQ</keyword>
<keyword>PSRLW</keyword><keyword>PSUBB</keyword><keyword>PSUBD</keyword><keyword>PSUBQ</keyword>
<keyword>PSUBSB</keyword><keyword>PSUBSW</keyword><keyword>PSUBUSB</keyword><keyword>PSUBUSW</keyword>
<keyword>PSUBW</keyword><keyword>PSWAPD</keyword><keyword>PUNPCKHBW</keyword><keyword>PUNPCKHDQ</keyword>
<keyword>PUNPCKHWD</keyword><keyword>PUNPCKLBW</keyword><keyword>PUNPCKLDQ</keyword><keyword>PUNPCKLWD</keyword>
<keyword>PXOR</keyword>
<!--128bit media (SSE1, 2 and 3)-->
<keyword>ADDPD</keyword><keyword>ADDPS</keyword><keyword>ADDSD</keyword><keyword>ADDSS</keyword>
<keyword>ADDSUBPD</keyword><keyword>ADDSUBPS</keyword><keyword>ANDNPD</keyword><keyword>ANDNPS</keyword>
<keyword>ANDPD</keyword><keyword>ANDPS</keyword><keyword>CMPPD</keyword><keyword>CMPPS</keyword>
<keyword>CMPSD</keyword><keyword>CMPSS</keyword><keyword>COMISD</keyword><keyword>COMISS</keyword>
<keyword>CVTDQ2PD</keyword><keyword>CVTDQ2PS</keyword><keyword>CVTPD2DQ</keyword><keyword>CVTPD2PI</keyword>
<keyword>CVTPD2PS</keyword><keyword>CVTPI2PD</keyword><keyword>CVTPI2PS</keyword><keyword>CVTPS2DQ</keyword>
<keyword>CVTPS2PD</keyword><keyword>CVTPS2PI</keyword><keyword>CVTSD2SI</keyword><keyword>CVTSD2SS</keyword>
<keyword>CVTSI2SD</keyword><keyword>CVTSI2SS</keyword><keyword>CVTSS2SD</keyword><keyword>CVTSS2SI</keyword>
<keyword>CVTTPD2DQ</keyword><keyword>CVTTPD2PI</keyword><keyword>CVTTPS2DQ</keyword><keyword>CVTTPS2PI</keyword>
<keyword>CVTTSD2SI</keyword><keyword>CVTTSS2SI</keyword><keyword>DIVPD</keyword><keyword>DIVPS</keyword>
<keyword>DIVSD</keyword><keyword>DIVSS</keyword><keyword>EXTRQ</keyword><keyword>HADDPD</keyword>
<keyword>HADDPS</keyword><keyword>HSUBPD</keyword><keyword>HSUBPS</keyword><keyword>INSERTQ</keyword>
<keyword>LDDQU</keyword><keyword>LDMXCSR</keyword><keyword>MASKMOVDQU</keyword><keyword>MAXPD</keyword>
<keyword>MAXPS</keyword><keyword>MAXSD</keyword><keyword>MAXSS</keyword><keyword>MINPD</keyword>
<keyword>MINPS</keyword><keyword>MINSD</keyword><keyword>MINSS</keyword><keyword>MOVAPD</keyword>
<keyword>MOVAPS</keyword><keyword>MOVDDUP</keyword><keyword>MOVDQA</keyword><keyword>MOVDQU</keyword>
<keyword>MOVHLPS</keyword><keyword>MOVHPD</keyword><keyword>MOVHPS</keyword><keyword>MOVLHPS</keyword>
<keyword>MOVLPD</keyword><keyword>MOVLPS</keyword><keyword>MOVMSKPD</keyword><keyword>MOVMSKPS</keyword>
<keyword>MOVNTDQ</keyword><keyword>MOVNTPD</keyword><keyword>MOVNTPS</keyword><keyword>MOVNTSD</keyword>
<keyword>MOVNTSS</keyword><keyword>MOVSHDUP</keyword><keyword>MOVSLDUP</keyword><keyword>MOVSS</keyword>
<keyword>MOVUPD</keyword><keyword>MOVUPS</keyword><keyword>MULPD</keyword><keyword>MULPS</keyword>
<keyword>MULSD</keyword><keyword>MULSS</keyword><keyword>ORPD</keyword><keyword>ORPS</keyword>
<keyword>RCPPS</keyword><keyword>RCPSS</keyword><keyword>RSQRTPS</keyword><keyword>RSQRTSS</keyword>
<keyword>SHUFPD</keyword><keyword>SHUFPS</keyword><keyword>SQRTPD</keyword><keyword>SQRTPS</keyword>
<keyword>SQRTSD</keyword><keyword>SQRTSS</keyword><keyword>STMXCSR</keyword><keyword>SUBPD</keyword>
<keyword>SUBPS</keyword><keyword>SUBSD</keyword><keyword>SUBSD</keyword><keyword>SUBSS</keyword>
<keyword>UCOMISD</keyword><keyword>UCOMISS</keyword><keyword>UNPCKHPD</keyword><keyword>UNPCKHPS</keyword>
<keyword>UNPCKLPD</keyword><keyword>UNPCKLPS</keyword><keyword>XORPD</keyword><keyword>XORPS</keyword>
                </context>
                
                <!--opcodes with condition codes-->
                <context id="opcodes_other" style-ref="opcode">
                    <match extended="true">
                        (?&lt;![\w\.])
                        ((J|CMOV|SET)N?(AE|BE|PE|PO|LE|GE|O|B|C|Z|E|A|S|P|L|G))|
                        (FCMOVN?(BE|B|E|U))
                        (?![\w\.])
                    </match>
                </context>
                
                
                <context id="registers" style-ref="register">
<!--General Purpose registers-->
<keyword>al</keyword><keyword>ah</keyword><keyword>ax</keyword><keyword>eax</keyword><keyword>rax</keyword>
<keyword>bl</keyword><keyword>bh</keyword><keyword>bx</keyword><keyword>ebx</keyword><keyword>rbx</keyword>
<keyword>cl</keyword><keyword>ch</keyword><keyword>cx</keyword><keyword>ecx</keyword><keyword>rcx</keyword>
<keyword>dl</keyword><keyword>dh</keyword><keyword>dx</keyword><keyword>edx</keyword><keyword>rdx</keyword>
<keyword>sil</keyword><keyword>si</keyword><keyword>esi</keyword><keyword>rsi</keyword>
<keyword>dil</keyword><keyword>di</keyword><keyword>edi</keyword><keyword>rdi</keyword>
<keyword>spl</keyword><keyword>sp</keyword><keyword>esp</keyword><keyword>rsp</keyword>
<keyword>bpl</keyword><keyword>bp</keyword><keyword>ebp</keyword><keyword>rbp</keyword>
<!--Segment registers-->
<keyword>cs</keyword><keyword>ds</keyword><keyword>ss</keyword><keyword>es</keyword>
<keyword>fs</keyword><keyword>gs</keyword>
<!--new 64 bit registers-->
<keyword>r8b</keyword><keyword>r8w</keyword><keyword>r8d</keyword><keyword>r8</keyword>
<keyword>r9b</keyword><keyword>r9w</keyword><keyword>r9d</keyword><keyword>r9</keyword>
<keyword>r10b</keyword><keyword>r10w</keyword><keyword>r10d</keyword><keyword>r10</keyword>
<keyword>r11b</keyword><keyword>r11w</keyword><keyword>r11d</keyword><keyword>r11</keyword>
<keyword>r12b</keyword><keyword>r12w</keyword><keyword>r12d</keyword><keyword>r12</keyword>
<keyword>r13b</keyword><keyword>r13w</keyword><keyword>r13d</keyword><keyword>r13</keyword>
<keyword>r14b</keyword><keyword>r14w</keyword><keyword>r14d</keyword><keyword>r14</keyword>
<keyword>r15b</keyword><keyword>r15w</keyword><keyword>r15d</keyword><keyword>r15</keyword>
<!--128 bit registers-->
<keyword>xmm0</keyword><keyword>xmm1</keyword><keyword>xmm2</keyword><keyword>xmm3</keyword>
<keyword>xmm4</keyword><keyword>xmm5</keyword><keyword>xmm6</keyword><keyword>xmm7</keyword>
<keyword>xmm8</keyword><keyword>xmm9</keyword><keyword>xmm10</keyword><keyword>xmm11</keyword>
<keyword>xmm12</keyword><keyword>xmm13</keyword><keyword>xmm14</keyword><keyword>xmm15</keyword>
<!--64 bit registers-->
<keyword>mmx0</keyword><keyword>mmx1</keyword><keyword>mmx2</keyword><keyword>mmx3</keyword>
<keyword>mmx4</keyword><keyword>mmx5</keyword><keyword>mmx6</keyword><keyword>mmx7</keyword>
<!--floating point registers-->
<keyword>fpr0</keyword><keyword>fpr1</keyword><keyword>fpr2</keyword><keyword>fpr3</keyword>
<keyword>fpr4</keyword><keyword>fpr5</keyword><keyword>fpr6</keyword><keyword>fpr7</keyword>
<!--Special registers-->
<keyword>flags</keyword><keyword>eflags</keyword><keyword>rflags</keyword>
<keyword>ip</keyword><keyword>eip</keyword><keyword>rip</keyword>
<keyword>cr0</keyword><keyword>cr2</keyword><keyword>cr3</keyword><keyword>cr4</keyword><keyword>cr8</keyword>
<keyword>dr0</keyword><keyword>dr1</keyword><keyword>dr2</keyword><keyword>dr3</keyword>
<keyword>dr6</keyword><keyword>dr7</keyword>
<keyword>gdtr</keyword><keyword>ldtr</keyword><keyword>idtr</keyword><keyword>tr</keyword>
                </context>

                <context id="types" style-ref="type">
<keyword>byte</keyword><keyword>word</keyword><keyword>dword</keyword><keyword>qword</keyword>
<keyword>tword</keyword><keyword>oword</keyword>
<keyword>db</keyword><keyword>dw</keyword><keyword>dd</keyword><keyword>dq</keyword>
<keyword>dt</keyword><keyword>do</keyword>
<keyword>resb</keyword><keyword>resw</keyword><keyword>resd</keyword><keyword>resq</keyword>
<keyword>rest</keyword><keyword>reso</keyword>
                </context>
                
                <context id="preprocessor_predefinded" style-ref="preprocessor">
<keyword>__float8__</keyword><keyword>__float16__</keyword><keyword>__float32__</keyword>
<keyword>__float64__</keyword><keyword>__float80m__</keyword><keyword>__float80e__</keyword>
<keyword>__float128l__</keyword><keyword>__float128h__</keyword>
<keyword>__Infinity__</keyword><keyword>__QNaN__</keyword><keyword>__NaN__</keyword><keyword>__SNaN__</keyword>
<keyword>seg</keyword><keyword>wrt</keyword><keyword>strict</keyword><keyword>INCBIN</keyword>
<keyword>EQU</keyword><keyword>TIMES</keyword><keyword>__NASM_MAJOR__</keyword><keyword>__NASM_MINOR__</keyword>
<keyword>__NASM_SUBMINOR__</keyword><keyword>__NASM_PATCHLEVEL__</keyword>
<keyword>__NASM_VERSION_ID__</keyword><keyword>__NASM_VER__</keyword><keyword>__FILE__</keyword>
<keyword>__LINE__</keyword><keyword>__BITS__</keyword><keyword>STRUC</keyword><keyword>ENDSTRUC</keyword>
<keyword>ISTRUC</keyword><keyword>AT</keyword><keyword>IEND</keyword><keyword>ALIGN</keyword>
<keyword>ALIGNB</keyword><keyword>BITS</keyword><keyword>USE16</keyword><keyword>USE32</keyword>
<keyword>DEFAULT</keyword><keyword>REL</keyword><keyword>ABS</keyword><keyword>SECTION</keyword>
<keyword>SEGMENT</keyword><keyword>__SECT__</keyword><keyword>ABSOLUTE</keyword>
<keyword>EXTERN</keyword><keyword>GLOBAL</keyword><keyword>COMMON</keyword><keyword>CPU</keyword>
<keyword>FLOAT</keyword><keyword>NAZ</keyword><keyword>NODAZ</keyword><keyword>NEAR</keyword>
<keyword>UP</keyword><keyword>DOWN</keyword><keyword>ZERO</keyword>
<keyword>__FLOAT_DAZ__</keyword><keyword>__FLOAT_ROUND__</keyword><keyword>__FLOAT__</keyword>
<keyword>ORG</keyword><keyword>MAP</keyword>
                </context>
                <context id="preprocessor_predefinded2" style-ref="preprocessor">
                    <match extended="true">
                        ((?&lt;![\w\.])
%define|%xdefine|%\+|%undef|%assign|%iassign|%strlen|%substr|%(i|end)?macro|
%(exit|end)?rep|%rotate|%(el)?ifn?(def|macro|ctx|id|idni?|str|num|)|%else|%endif|
%error|%include|%push|%pop|%repl|%arg|%stacksize|%local|%line|%!\w+
                        (?![\w\.]))|%\d+
                    </match>
                </context>

            </include>
        </context>
        
    </definitions>
</language>
