Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download
# file opened: lua_set_page.asm
1 0000 DEVICE none
2 0000
3 0000 lua
4 0000 ~ -- v1.20.0 added visible warning message
5 0000 ~ assert(not sj.set_page(1))
lua_set_page.asm(5): warning: [LUA] sj.set_page: only allowed in real device emulation mode (See DEVICE)
6 0000 endlua
7 0000
8 0000 DEVICE zxspectrum128
9 0000
10 0000 lua
11 0000 ~ assert(not sj.set_page(233))
12 0000 ~ assert(not sj.set_page(-1))
13 0000 ~ assert(sj.set_page(6))
lua_set_page.asm(11): error: [LUA] [sj.set_page] Page number must be in range 0..7: 233
lua_set_page.asm(12): error: [LUA] [sj.set_page] Page number must be in range 0..7: -1
14 0000 endlua
15 0000
16 0000 ASSERT(7 == $$) ; slot 0 should be still default page 7
17 0000 ORG 0xC000
18 C000 ASSERT(6 == $$) ; default slot 3 should be page 6 set by lua
19 C000
20 C000 lua pass3 ; wrong arguments
21 C000 ~ sj.set_page(233, 2) -- not reported since Lua5.4 and LuaBridge 2.6 integration :(
22 C000 ~ sj.set_page()
lua_set_page.asm(21): error: [LUA] [sj.set_page] Page number must be in range 0..7: 233
lua_set_page.asm(22): error: [LUA] bad argument #1 to 'set_page' (number expected, got no value)
23 C000 endlua
24 C000
# file closed: lua_set_page.asm
Value Label
------ - -----------------------------------------------------------