?login_element?

Subversion Repositories NedoOS

Rev

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

  1.         ;; DEFL vs EQU difference
  2. defl_lab2   DEFL    0x1234              ;; DEFL (and alias "=") are like "variables"
  3. defl_lab2   =       0x5678              ;; so modifying them is OK
  4.  
  5. equ_lab2    EQU     0x1234              ;; EQU is like "const", should be defined only once
  6. equ_lab2    EQU     0x5678              ;; error, different value
  7.  
  8.         ;; valid forward reference
  9.         call    normal_label
  10. normal_label:
  11.         ret
  12.  
  13.         ;; invalid forward references
  14. defl_lab    DEFL    defl_lab_fwd
  15. equ_lab     EQU     equ_lab_fwd         ;; !! VALID since v1.13.3 !!
  16.  
  17.         IF 0 < normal_label2_fwd
  18.             ; <some instruction> - would modify results of pass2 vs pass3
  19.         ENDIF
  20.  
  21.         STRUCT test_struct, struct_lab_fwd
  22. xyz         BYTE
  23.         ENDS
  24.  
  25.         DUP dup_label_fwd
  26.         EDUP
  27.  
  28. defl_lab_fwd:
  29. equ_lab_fwd:
  30. struct_lab_fwd:
  31. normal_label2_fwd:
  32. dup_label_fwd:
  33.  
  34.         IF 0 < normal_label3_fwd    ; fwdref-ok - since v1.15.0 it's possible to suppress the warning
  35.             ASSERT 0 < $
  36.         ENDIF
  37.  
  38.         IF 4 = normal_label3_fwd    ; fwdref-ok - but label reports warning even when IF warning is suppressed
  39.             nop
  40.         ENDIF
  41.  
  42. normal_label3_fwd:
  43.