Blame | Last modification | View Log | Download
# file opened: lua_get_set_device.asm1 0000 LUA ALLPASS2 0000 ~ assert("NONE" == sj.get_device())3 0000 ~ assert("NONE" == sj.get_device(1)) -- extra argument doesn't matter with LuaBridge2.64 0000 ~5 0000 ~ sj.set_device("ZXSPECTRUM48") -- zx48, default ramtop6 0000 ~ assert("ZXSPECTRUM48" == sj.get_device())7 0000 ~8 0000 ~ sj.set_device("ZXSPECTRUM128",0xFEDC) -- zx128, specific ramtop9 0000 ~ assert("ZXSPECTRUM128" == sj.get_device())10 0000 ~11 0000 ~ sj.set_device("ZXSPECTRUM128",0xEDCB) -- warning about different ramtop value12 0000 ~13 0000 ~ sj.set_device("NONE")14 0000 ~ assert("NONE" == sj.get_device())lua_get_set_device.asm(11): warning[devramtop]: [LUA] [DEVICE] this device was already opened with different RAMTOP value15 0000 ENDLUA16 000017 0000 DEVICE ZXSPECTRUM4818 0000 ORG 0x123418 1234 30 DB 48lua_get_set_device.asm(19): warning[devramtop]: [DEVICE] this device was already opened with different RAMTOP value19 1235 DEVICE ZXSPECTRUM128, 0xEDCB20 1235 ORG 0x123420 1234 80 DB 12821 123522 1235 LUA PASS323 1235 ~ sj.set_device("ZXSPECTRUM48")24 1235 ~ assert(48 == sj.get_byte(0x1234))25 1235 ~ assert("ZXSPECTRUM48" == sj.get_device())26 1235 ~27 1235 ~ assert(false == sj.set_device("invalid"))28 1235 ~ assert("NONE" == sj.get_device()) -- invalid id does cause switch to NONE29 1235 ~30 1235 ~ sj.set_device("ZXSPECTRUM128",0xFEDC)31 1235 ~ assert(128 == sj.get_byte(0x1234))32 1235 ~33 1235 ~ assert(true == sj.set_device()) -- default id is "NONE"34 1235 ~ assert("NONE" == sj.get_device())35 1235 ENDLUA36 1235# file closed: lua_get_set_device.asmValue Label------ - -----------------------------------------------------------