Не могу понять, как правильно работать с IFUSED?
Главная программа.DEVICE ZXSPECTRUM48
ORG 0x8000
main:
<code>
<code>
<code>
<code>
<code>
ret
include "address.asm" ; здесь объявлен модуль coords
include "out43.asm"
include "sto_rec.asm"
include "pause.asm"
include "windows.asm"
Файл address.asm, в котором объявлен модуль coords.module coords
ifused XxXxXxX
XxXxXxX <code>
<code>
<code>
<code>
ret
endif
Другой модуль, который ссылается на ссылку в модуле coords.module windows
CLS <code>
<code>
<code>
<code>
<code>
call coords.XxXxXxX
ret
Результат...Pass 3 complete
Errors: 4, warnings: 0, compiled: 870 lines, work time: 0.015 seconds
The terminal process "C:\Program Files\PowerShell\7\pwsh.exe -Command sjasmplus --sld=test.sld --fullpath test.asm" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
> Executing task: sjasmplus --sld=test.sld --fullpath test.asm <
SjASMPlus Z80 Cross-Assembler v1.18.2 (https://github.com/z00m128/sjasmplus)
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
windows.asm(91): error: Label not found: windows.coords.XxXxXxX
Что неправильно?
upd
"Known bug: when code is using label inside module "moduleX", like call labelY, only usage of moduleX.labelY label is noted. Then if you define "labelY" outside of module and hide it inside IFUSED labelY block, the call from module will be unable to find the routine.
Workaround: you can use the global-label operator @: "call @labelY" to trigger usage of the global "labelY", or you can use the alternative IFUSED syntax "labelY: IFUSED" which does not only check condition, but also does define the label. Once the label is defined, the "call labelY" line inside module will find the global variant and mark it as "used" correctly."
Оно?
Вроде бы, оно...
Но новая беда - если написать
labelY: IFUSED
то не работают временные метки.![]()




Ответить с цитированием
Размещение рекламы на форуме способствует его дальнейшему развитию 
