?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     org     0x1234          ; eol comment belong to ORG
  2.     lua allpass
  3.         assert(0 == _c(nil))
  4.         assert(0 == _c(""))
  5.         assert(123 == _c("123"))
  6.         assert(0x1234 == _c("$"))
  7.         assert(0x1234 == _c("label"))
  8.         assert(-1 == _c("-1"))      -- check the result is signed integer
  9.     endlua
  10.     lua pass1
  11.         assert(0 == _c(nil))
  12.         assert(0 == _c(""))
  13.         assert(123 == _c("123"))
  14.         assert(0x1234 == _c("$"))
  15.         assert(0 == _c("label"))    -- label is not defined yet
  16.     endlua
  17.     lua pass2
  18.         assert(0 == _c(nil))
  19.         assert(0 == _c(""))
  20.         assert(123 == _c("123"))
  21.         assert(0x1234 == _c("$"))
  22.         assert(0x1234 == _c("label"))
  23.     endlua
  24.     lua pass3
  25.         assert(0 == _c(nil))
  26.         assert(0 == _c(""))
  27.         assert(123 == _c("123"))
  28.         assert(0x1234 == _c("$"))
  29.         assert(0x1234 == _c("label"))
  30.     endlua
  31.     lua
  32.         assert(0 == _c(nil))
  33.         assert(0 == _c(""))
  34.         assert(123 == _c("123"))
  35.         assert(0x1234 == _c("$"))
  36.         assert(0x1234 == _c("label"))
  37.     endlua
  38. label:
  39.  
  40.     ; sjasmplus expression evaluator is strictly 32-bit, following are consequences
  41.  
  42.     ; Overflow error detected in evaluator (while parsing value)
  43.     lua
  44.         _c("0x1FFFFFFFF")
  45.     endlua
  46.     ; truncated result
  47.     lua
  48.         assert(0x34567800 == _c("0x12345678<<8"))
  49.     endlua
  50.