?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     DEVICE ZXSPECTRUM48
  2.     ORG 0x7842
  3. test:   DEFB 0x41, 0x78
  4.     OUTPUT "lua_get_byte.bin"
  5.     LUA ALLPASS
  6.         _pc("db "..sj.get_byte(sj.calc("test"))..", "..sj.calc("low test"))
  7.         _pc("db "..sj.get_byte(0x7842)..", "..0x42)
  8.     ENDLUA
  9.  
  10.     LUA ALLPASS
  11.         x = sj.calc("test + ~ ")    -- invalid syntax for expression evaluation, returns 0
  12.         _pc("db 'e'+"..x)
  13.     ENDLUA
  14.  
  15.     LUA pass3 ; wrong arguments
  16.         sj.get_byte(0x1234, 2)      -- not reported since Lua5.4 and LuaBridge 2.6 integration :(
  17.     ENDLUA
  18.  
  19.     ; extra test coverage
  20.     LUA PASS3
  21.         sj.get_byte()               -- missing argument
  22.     ENDLUA
  23.