Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download
luaincSS.asm(19): warning: [LUA] Pass updated to 1, device: NONE# file opened: luaincSS.asm1 0000 ; test include paths on command line and their priorities, there are multiple steps:2 0000 ; luainc.asm = no extra include path, should include from working directory3 0000 ; luaincS.asm = +include paths "luaincSSSS_v"4 0000 ; luaincSS.asm = +include paths "luaincSSSS_i"5 0000 ; luaincSSS.asm = +include paths "luaincSSSS_v", "luaincSSSS_i"6 0000 ; luaincSSSS.asm = +include paths "luaincSSSS_i", "luaincSSSS_v"7 00008 0000 ; The following code is intentionally mischievous and damaging assembling process, and9 0000 ; the results of the assembling will very likely change in the future, as the work10 0000 ; on consolidation of sjasmplus will continue, this is NOT example how to use lua scripts!11 0000 ; it's more like anti-example, how to NOT use it.12 000013 0000 LUA PASS114 0000 ~ pass = 015 0000 ENDLUA16 0000 LUA ALLPASS17 0000 ~ pass = pass + 118 0000 ~ if pass == 1 or pass == 3 then19 0000 ~ sj.warning('Pass updated to ' .. pass .. ', device: ' .. sj.get_device())20 0000 ~ endluaincSS.asm(19): warning: [LUA] Pass updated to 3, device: ZXSPECTRUM102421 0000 ENDLUA22 000023 0000 DEVICE ZXSPECTRUM102424 000025 0000 ORG $800026 800027 8000 INCLUDELUA luaincSSSS.lua ; this will load local version (defining two functions)28 800029 8000 INCLUDELUA <luaincSSSS.lua> ; this may load "system" version depending on -I options30 800031 8000 loopyLoop:32 800033 8000 CD 09 80 call forwardyLabelo34 800335 8003 LUA ALLPASS36 8003 ~ inc_ld_local('A', pass + 10) -- defined only in local LUA script (never changes)37 8003 3E 0D LD A,13 ; function only in local include37 8005 3E 0D LD A,13 ; function only in local include37 8007 3E 0D LD A,13 ; function only in local include37 8009 ENDLUA38 800939 8009 LUA ALLPASS40 8009 ~ inc_ld_system('A', pass) -- defined in all includes, the one with priority winsluaincSSSS_i/luaincSSSS.lua(3): error: [LUA] Unrecognized instruction: LDINVALID A,3luaincSS.asm(40): ^ emitted from here41 8009 LDINVALID A,3 ; overloaded funcion (system-invalid variant)41 8009 ENDLUA42 800943 8009 18 F5 jr loopyLoop44 800BluaincSS.asm(45): warning: Label has different value in pass 3: previous value 32777 not equal 3277945 800B forwardyLabelo:46 800B C7 rst 047 800CluaincSS.asm(48): warning: Negative BLOCK?48 800C ds stretchItEvenMore-forwardyLabelo-1, 20149 000050 0000 ALIGN 25651 0000 stretchItEvenMore:52 0000 D7 rst 1653 0001# file closed: luaincSS.asmValue Label------ - -----------------------------------------------------------0x800B forwardyLabelo0x8000 loopyLoop0x0000 stretchItEvenMore