?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     ; dot repeater is partially tested in docs_examples, here are more complex cases and errors
  2.     .16     ld  (hl),c                ; 16x 0x71
  3. x:
  4.     .( ( 2*2 ) + 12 )   ret z       ; 16x 0xC8
  5.     .(x)    ld  (hl),d              ; 16x 0x72
  6.  
  7.     ;; syntax errors
  8.     .2.3    nop     ; there must be space after repeat-counter
  9.     . 16    nop     ; but no space after dot
  10.     . (16)  nop
  11.     .-1     nop
  12.     .(zz)   nop     ; undefined label
  13.     .16+2   nop     ; expressions must be in parentheses
  14.     .1 +2   nop     ; expressions must be in parentheses (this one is ugly :/ )
  15.  
  16.     ;; value errors
  17.     .0      nop     ; counter must be positive value
  18.     .(x-32) nop     ; error should show calculated repeat-counter value
  19.  
  20.     ;; whole expression must be enclosed in parentheses (did work as "x7" up to v1.17.0)
  21.     .(-1) +8 nop    ; error -1 count
  22.  
  23.     .(4-2)  and 1   ; counter example why the above is NOT harmless (revealed in v1.17.0)
  24.         ; this produces 2x "and 1" (in v1.17.0 it does instead add `and 1` to expression)
  25.  
  26.     .(5-3   and 2   ; parentheses are not closed
  27.     .(6-4)) and 3   ; one too many closing parentheses
  28.