! Syntax Highlighting Patterns for Siemens SAB-C504 Assembly Language ! By Freek van Walderveen ! ! In NEdit Version 5.0.1 and beyond, load this pattern by starting nedit with: ! ! nedit -import ! ! Then, check that the patterns were loaded correctly, and choose Save Defaults ! from the Preferences menu. The new patterns will now be incorporated into ! your own .nedit file, so the next time you start NEdit, you will no longer ! need to use -import. ! ! In version 5.0, without -import, you must edit your .nedit file by hand and ! add the contents of each resource below to the corresponding list in your ! .nedit file. Be sure to separate new entries with \n, and continue resource ! strings by escaping all newlines within a resource value with \ (backslash), ! leaving only the last line of the resource value not ending in \. ! nedit.highlightPatterns: ASM 504:1:0{\n\ keyword:"<(ACALL|ADD|ADDC|AJMP|ANL|CJNE|CLR|CPL|DA|DEC|DIV|DJNZ|INC|JB|JBC|JC|JMP|JNB|JNC|JNZ|JZ|LCALL|LJMP|MOV|MOVC|MOVX|MUL|NOP|ORL|POP|PUSH|RET|RETI|RL|RLC|RR|RRC|SETB|SJMP|SUBB|SWAP|XCH|XCHD|XRL)>":::Keyword::D\n\ inline Comment:";.*":::Comment::\n\ strings:"L?""":"""":"\\n":String1::\n\ label:"^( *[a-zA-Z0-9_]+[:])":::Label::\n\ assembler directives:"<(BYTE|DB|DEFB|DEFM|DM|EJECT|ELSE|ENDIF|EQU|FLAG|IF|INCL|END|FOLD|LIST|LMARG|NOFLD|NOLST|PAGE|PGLEN|TABS|ORG|DEFS|DS|SKIP|TOCON|SBTTL|TITLE|TOLST|USING|WIDTH|DEFW|DW|WORD)>":::Preprocessor::D\n\ direct:"#(([01]+[01]*b)|(0(x|X)[0-9a-fA-F]*)|([0-9]+[0-9a-fA-F]*h)|([0-9]+[0-9]*[d]?))":::Numeric Const::D\n\ number:"<(([01]+[01]*b)|(0(x|X)[0-9a-fA-F]*)|([0-9]+[0-9a-fA-F]*h)|([0-9]+[0-9]*[d]?))>":::String2::D\n\ bit:"<(A.[0-7]|C|CY|AC|IADC|BSY|ADM|P|OV|RS[01]|F[01]|T[FR]?[012]|EWPD|T2EX|T2|EAN[0-7]|SM[012]|[REN]|[T]B8|TI|RI|EA|ES|ET[012]|EX[01]|INT[01]|PT[012]|PX[01]|PS|OWDS|WDTS|WDT|SWDT|EXEN2|EXF2|TCLK|RCLK|MX[012])>":::Identifier2::\n\ identifier:"<(ACC|B|DPTR|ADCON[01]|ADDATH|ADDATL|DPH|DPL|FALSE|IE|IEN[01]|IP|IP[01]|ITCON|P[0-3|P[13]ANA|PCON|PCON1|PSW|RCAP2[HL]|RL2|RC2[HL]|SBUF|SCON|SP|SYSCON|T2CON|T2MOD|TCON|TH0|TH1|TH2|TL0|TL1|TL2|TMOD|TRUE|WDTREL|WDCON|CT[12]CON|CC[HL][012]|CP2[HL]|CMP2[HL]|CCIE|BCON|CCP[HL]|VR[012]|COINI|CMSEL[01]|CCIR|CT10F[HL])>":::Identifier1::\n\ register:"<(A|R[0-7])>":::Identifier::\n\ } nedit.languageModes: ASM 504:.asm:::::::