?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     LUA PASS1
  2.         asmpass = 0 + sj.get_define("__PASS__")
  3.         if (1 ~= asmpass) then sj.error("unexpected __PASS__ value", asmpass) end
  4.     ENDLUA
  5.     LUA PASS2
  6.         asmpass = 0 + sj.get_define("__PASS__")
  7.         if (2 ~= asmpass) then sj.error("unexpected __PASS__ value", asmpass) end
  8.     ENDLUA
  9.     LUA PASS3
  10.         asmpass = 0 + sj.get_define("__PASS__")
  11.         if (3 ~= asmpass) then sj.error("unexpected __PASS__ value", asmpass) end
  12.     ENDLUA
  13.  
  14.     ASSERT $120 == myLab    ; assert is PASS3
  15.  
  16.     IF 3 == __PASS__
  17. myLab = myLab + $003
  18.         DW  myLab
  19.     ENDIF
  20.     IF 2 == __PASS__
  21. myLab = myLab + $020
  22.     ENDIF
  23.     IF 1 == __PASS__
  24. myLab = $100
  25.     ENDIF
  26.  
  27.     ASSERT $123 == myLab    ; assert is PASS3
  28. ; emitting machine code only in pass3 breaks the coherence of label system
  29. WarningOnLabelBecauseOfBreakingPassCoherence:
  30.