
Сообщение от
Ped7g
I'm really failing to replicate this:
Aw **** here we go again =)
Код:
DEVICE ZXSPECTRUM128
org #8000
appStart
define appName cursor ; comment
LUA ALLPASS
sj.insert_define("SAVEPATH", '"install/bin/' .. sj.get_define("appName") .. '"')
ENDLUA
db SAVEPATH
appEnd
SAVEBIN "test.bin", appStart, appEnd-appStart
result:
Код:
sjasmplus.exe test.asm --lst=test.lst
SjASMPlus Z80 Cross-Assembler v1.18.3 (https://github.com/z00m128/sjasmplus)
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
Pass 3 complete
Errors: 0, warnings: 0, compiled: 17 lines, work time: 0.015 seconds
test.lst
Код:
# file opened: test.asm
1 0000 DEVICE ZXSPECTRUM128
2 0000
3 0000 org #8000
4 8000
5 8000 appStart
6 8000
7 8000 define appName cursor ; comment
8 8000
9 8000 LUA ALLPASS
10 8000 ~ sj.insert_define("SAVEPATH", '"install/bin/' .. sj.get_define("appName") .. '"')
11 8000 ENDLUA
12 8000
13 8000 69 6E 73 74 db "install/bin/ cursor "
13 8004 61 6C 6C 2F
13 8008 62 69 6E 2F
13 800C 20 20 20 63
13 8010 75 72 73 6F
13 8014 72 09 09 09
13 8018 09
14 8019
15 8019 appEnd
16 8019
17 8019 SAVEBIN "test.bin", appStart, appEnd-appStart
# file closed: test.asm
now also got trailing space before appName =)