Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download
# file opened: lua_get_byte.asm1 0000 DEVICE ZXSPECTRUM482 0000 ORG 0x78423 7842 41 78 test: DEFB 0x41, 0x784 7844 OUTPUT "lua_get_byte.bin"5 7844 LUA ALLPASS6 7844 ~ _pc("db "..sj.get_byte(sj.calc("test"))..", "..sj.calc("low test"))7 7844 ~ _pc("db "..sj.get_byte(0x7842)..", "..0x42)8 7844 41 42 db 65, 668 7846 41 42 db 65, 668 7848 ENDLUA9 784810 7848 LUA ALLPASS11 7848 ~ x = sj.calc("test + ~ ") -- invalid syntax for expression evaluation, returns 012 7848 ~ _pc("db 'e'+"..x)13 7848 65 db 'e'+013 7849 ENDLUA14 784915 7849 LUA pass3 ; wrong arguments16 7849 ~ sj.get_byte(0x1234, 2) -- not reported since Lua5.4 and LuaBridge 2.6 integration :(17 7849 ENDLUA18 784919 7849 ; extra test coverage20 7849 LUA PASS321 7849 ~ sj.get_byte() -- missing argumentlua_get_byte.asm(21): error: [LUA] bad argument #1 to 'get_byte' (number expected, got no value)22 7849 ENDLUA23 7849# file closed: lua_get_byte.asmValue Label------ - -----------------------------------------------------------0x7842 test