?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     DEVICE ZXSPECTRUM128
  2.     OUTPUT "Issue42_local_labels.bin"
  3.     ORG #8000
  4.  
  5.     MODULE M1
  6.  
  7. LABEL equ 0
  8.  
  9.     ENDMODULE
  10.  
  11.     MODULE M2
  12.  
  13.     IFNUSED M1.LABEL
  14. .tmp = M1.LABEL
  15.     ; two lines (L15 + L16) with any content was "error", one line only + ENDIF was "OK"
  16.     ; L16 comment (breaking sjasmplus v1.11 (and older))
  17.     ENDIF
  18.  
  19.     ; the issue was, that the lines inside IFNUSED are parsed in first pass only
  20.     ; (condition is different in second and third pass)
  21.     ; making the search for local labels to operate on different source-structure in 2nd+ pass
  22.  
  23.     ; this particular source will now compile after some updates to the local labels code,
  24.     ; but in principle it is easy to produce other code which would not reach stable
  25.     ; structure within 3-pass assembling process, making local labels out of sync again.
  26.  
  27.     ENDMODULE
  28.  
  29. 1
  30.     jr 2f
  31.     jr 1b
  32. 2
  33.