?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     DEVICE none
  2.  
  3.     lua
  4.         -- warning because no device is set
  5.         assert(not sj.set_slot(1))
  6.     endlua
  7.  
  8.     DEVICE zxspectrum128
  9.  
  10.     ORG 0xC000
  11.     ASSERT 0 == $$  ; slot 3 should be at default page 0
  12.     ORG 0x8000
  13.     ASSERT 2 == $$  ; slot 2 should be at default page 2
  14.  
  15.     lua
  16.         assert(not sj.set_slot(4))
  17.     endlua
  18.  
  19.     lua
  20.         assert(not sj.set_slot(-1))
  21.     endlua
  22.  
  23.     lua allpass
  24.         assert(sj.set_slot(2))
  25.     endlua
  26.  
  27.     PAGE 6
  28.     ASSERT 6 == $$  ; slot 2 should be active by lua script => page 6 there
  29.  
  30.     ; test the address-based slot selecting
  31.     lua allpass
  32.         assert(sj.set_slot(0xC000))
  33.     endlua
  34.  
  35.     PAGE 5
  36.     ORG 0xC000
  37.     ASSERT 5 == $$  ; slot 3 should be active by lua script => page 5 there
  38.  
  39.     lua pass3 ; wrong arguments
  40.         sj.set_slot(1, 2)   -- not reported since Lua5.4 and LuaBridge 2.6 integration :(
  41.         sj.set_slot()
  42.     endlua
  43.