home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / OpenLinux 2.3 CD.iso / live / usr / share / vim / syntax / asmh8300.vim < prev    next >
Encoding:
Text File  |  1999-08-10  |  1.9 KB  |  68 lines

  1. " Vim syntax file
  2. " Language:    Hitachi H-8300h specific syntax for GNU Assembler
  3. " Maintainer:    Kevin Dahlhausen <ap096@po.cwru.edu>
  4. " Last change:    1997 April 20
  5.  
  6. " Remove any old syntax stuff hanging around
  7. syn clear
  8.  
  9. syn case ignore
  10.  
  11. syn match asmDirective "\.h8300[h]*"
  12.  
  13. "h8300[h] registers
  14. syn match asmReg    "e\=r[0-7][lh]\="
  15.  
  16. "h8300[h] opcodes - order is important!
  17. syn match asmOpcode "add\.[lbw]"
  18. syn match asmOpcode "add[sx :]"
  19. syn match asmOpcode "and\.[lbw]"
  20. syn match asmOpcode "bl[deots]"
  21. syn match asmOpcode "cmp\.[lbw]"
  22. syn match asmOpcode "dec\.[lbw]"
  23. syn match asmOpcode "divx[us].[bw]"
  24. syn match asmOpcode "ext[su]\.[lw]"
  25. syn match asmOpcode "inc\.[lw]"
  26. syn match asmOpcode "mov\.[lbw]"
  27. syn match asmOpcode "mulx[su]\.[bw]"
  28. syn match asmOpcode "neg\.[lbw]"
  29. syn match asmOpcode "not\.[lbw]"
  30. syn match asmOpcode "or\.[lbw]"
  31. syn match asmOpcode "pop\.[wl]"
  32. syn match asmOpcode "push\.[wl]"
  33. syn match asmOpcode "rotx\=[lr]\.[lbw]"
  34. syn match asmOpcode "sha[lr]\.[lbw]"
  35. syn match asmOpcode "shl[lr]\.[lbw]"
  36. syn match asmOpcode "sub\.[lbw]"
  37. syn match asmOpcode "xor\.[lbw]"
  38. syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt"
  39. syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi"
  40. syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset"
  41. syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa"
  42. syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe"
  43. syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc"
  44. syn keyword asmOpcode "sub" "trapa" "xorc"
  45.  
  46. syn case match
  47.  
  48.  
  49. " Read the general asm syntax
  50. source <sfile>:p:h/asm.vim
  51.  
  52.  
  53. if !exists("did_hitachi_syntax_inits")
  54.   let did_hitachi_syntax_inits = 1
  55.  
  56.   hi link asmOpcode  Statement
  57.   hi link asmRegister  Identifier
  58.  
  59.   " My default-color overrides:
  60.   hi asmOpcode ctermfg=yellow
  61.   hi asmReg    ctermfg=lightmagenta
  62.  
  63. endif
  64.  
  65. let b:current_syntax = "asmh8300"
  66.  
  67. " vim: ts=8
  68.