Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download
luainc.asm(19): warning: [LUA] Pass updated to 1, device: NONE# file opened: luainc.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 ~ endluainc.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 0B 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 wins41 8009 3E 03 LD A,3 ; overloaded funcion (local variant)41 800B ENDLUA42 800B43 800B 18 F3 jr loopyLoop44 800Dluainc.asm(45): warning: Label has different value in pass 3: previous value 32779 not equal 3278145 800D forwardyLabelo:46 800D C7 rst 047 800Eluainc.asm(48): warning: Negative BLOCK?48 800E ds stretchItEvenMore-forwardyLabelo-1, 20149 000050 0000 ALIGN 25651 0000 stretchItEvenMore:52 0000 D7 rst 1653 0001# file closed: luainc.asmValue Label------ - -----------------------------------------------------------0x800D forwardyLabelo0x8000 loopyLoop0x0000 stretchItEvenMore