?login_element?

Subversion Repositories NedoOS

Rev

Rev 129 | Blame | Compare with Previous | Last modification | View Log | Download

  1. ;; This is not test of sjasmplus itself, but this is used to check Kate-syntax-highlight
  2. ;; The syntax highlight rules are in "asm-z80-sj.xml" file in the project root directory
  3.  
  4.     device zxspectrum48     ; directive of sjasmplus
  5.     org     $A8, 0xA8, #A8  ; hexa, also: 0A8h
  6.     disp    43008, 43008d   ; decimal
  7. With relaxed syntax of Z80 assemblers, "label" is usually default result of anything
  8.  
  9.     ld      hl, %10011100, de, 0b10011100   ; binary, also: 0011b
  10.     ld      de, 7777o, bc, 0q7777           ; octal, also: 77q
  11.     ld      bc, %1111'0000  ; C++ num-group separator
  12.    db      'apostrophe''s "text"', "quotes\'\\\"\? 'text'", 0
  13.     ldirx
  14.     bsra    de,b            ; NEXT opcodes of course added (can have different colour)
  15.     cp      ''''            ;"TODO" in comments exists (also FIXME and FIX ME).
  16. s:  ; some label
  17. // also C line comments supported
  18.     call    s, s            ; conditional call/jp/jr/ret highlights also condition
  19.         ; "s" is actually unofficial alias for "m" supported by some assembler ("ns"=p)
  20.     ret     nz              ; control-flow instructions are extra colour
  21.     rlc     (ix-128),e      ; unofficial Z80 instructions are highlighted extra
  22.     res     5,(ix+6),a      ; (but it goes also over arguments, maybe shouldn't, TODO)
  23.     res     5,(ix+30)       ; compared to official instruction
  24.  
  25.     and     7+(3<<1)
  26.     and     low .localLab   ; FIXME: operators are mostly defined, but rules are missing
  27.  
  28.     MACRO leMacron _arg0?
  29.         defb    $DD, 1
  30.         nextreg $15, $0
  31.     ENDM
  32.  
  33.     ; in case you accidentally write non-instruction, it will highlight as label! :D
  34.     jnz     s               ; still makes it easier to catch
  35.     leMacron arg0           ; but so do also correctly used macros
  36. .localLab:
  37.     hex     F32712bcd3561   ; unpaired digit or non-digit is highlighted as "error"
  38. !!alsoThisInvalidLabel
  39.     dg      ..##..##  #$01!-._  ; DG bit map is highlights as "data" (0) vs "number" (1)
  40.