?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.     ORG $1000
  2.  
  3.     RELOCATE_START
  4.  
  5. norel:  jp norel        ; "norel" as label itself (should relocate) +warning about keyword
  6.     jp norel norel      ; should not relocate
  7.  
  8. label1:
  9.     call    label1                      ; should relocate
  10.     call    nc,norel   label1           ; should not relocate
  11.     call    nz,norel(label1)            ; should not relocate
  12.     call    c,norel label1 + label1     ; should relocate because only first "label1" is norel
  13.     call    z,norel(label1 + label1)    ; should not relocate
  14.  
  15.     ld      a,high norel label1         ; no warning about unstable expression
  16.     ld      a,norel high label1         ; error about missing label "high" (norel must be followed by label expression)
  17.     ld      a,norel  (high label1)      ; (or parentheses will make high operator legal)
  18.  
  19.     jp      $                           ; should relocate
  20.     jp      norel $                     ; should not relocate
  21.  
  22.     RELOCATE_END
  23.  
  24.     RELOCATE_TABLE
  25.  
  26.     ASSERT 2*relocate_count == relocate_size
  27.     ASSERT 4 == relocate_count
  28.     ASSERT 2 == __ERRORS__
  29.     ASSERT 1 == __WARNINGS__
  30.