User Tag List

Показано с 1 по 10 из 699

Тема: SjASMPlus от z00m

Комбинированный просмотр

Предыдущее сообщение Предыдущее сообщение   Следующее сообщение Следующее сообщение
  1. #1

    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    229
    Спасибо Благодарностей отдано 
    51
    Спасибо Благодарностей получено 
    103
    Поблагодарили
    77 сообщений
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от krt17 Посмотреть сообщение
    Так то бог с ним, сломал и сломал, просто надо выпилить из синтаксиса и убрать из доков.
    Ah, interesting, but I think I know what is happening.

    The line `call test1` is inside module `test`, so it has ambiguous interpretation, it can be either `call test.test1` calling another inside-module label, or it can be interpreted as `call test1` in global namespace without module.

    If you remove the `IFUSED` test, the global `test1` will be defined, and in second+ pass the `call` will find it and use it, interpreting it as global label.

    But with the `IFUSED` the global label is never defined, and the `call` will always trigger only the "in-module" interpretation (marking "test.test1" label as "used + not_defined", but that's not relevant to the `IFUSED` in include file, so that will be always false).

    You can either use the other syntax of `IFUSED` after the label ("style1a"/"style1b" in my previous example, which do define the global label even when the label is unused, and the code is skipped, i.e.:
    Код:
    test1   IFUSED
                ret
            ENDIF
    Or you can disambiguate the call line by using `call @test1` to make it clear the "test1" is label from global name space, not belonging to current `test` module.

    (I guess you do not want the `test1` to belong into module `test`, otherwise also defining the `test1` routine inside the module will fix the error too, but then you have `test.test1` routine, not `test1`).

    To fix this (in relaxed syntax way, allowing the source you posted as valid) the `call` would have to generate ambiguous two-variant "possibly used label" meta data, and the IFUSED would have to check all these variants then... Which is unfortunately not trivial fix. (and without thinking about it properly, I would be afraid of such change to backfire by having old source in modules generating suddenly lot more global undefined+used labels in the table, but maybe that's no issue at all, I don't know)

    (and I'm not a big fan of relaxed syntax which has ambiguous interpretations, so I'm a bit tempted to fix this by removing "style2" syntax of IFUSED ... ... and also remove the global labels search when inside the module, to make the `@` mandatory in this case ... that would be like "correct" fix by my taste, but I guess that's not helping to actual users :P )

    So at this moment I don't want to try to fix this, IMO either using the `@` or the "style1a" IFUSED syntax is good-enough workaround? But I should probably add this bug description to IFUSED docs as known bug.

    Sorry for the inconvenience, I hope you can manage around this... (and of course thank you for the report)
    Последний раз редактировалось Ped7g; 06.11.2019 в 01:59.

  2. #1
    С любовью к вам, Yandex.Direct
    Размещение рекламы на форуме способствует его дальнейшему развитию

  3. #2

    Регистрация
    31.01.2007
    Адрес
    Москва
    Сообщений
    810
    Спасибо Благодарностей отдано 
    11
    Спасибо Благодарностей получено 
    77
    Поблагодарили
    59 сообщений
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Проблема лишь в том что в старом синтаксисе не работает, а в новом работает, почему в одном случае оно помечает использование в глобальных а во втором нет? У меня не так много включаемых библиотек, я просто их поправил. Глобальный поиск по собаке из модулей наверное правильно, пожалуй переделаю свои потихоньку, через пару лет.

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Похожие темы

  1. SjASMPlus Z80 кросс ассемблер
    от Aprisobal в разделе Программирование
    Ответов: 1663
    Последнее: 19.06.2021, 01:36
  2. Исходники TR-DOS для SjASMPlus
    от Keeper в разделе Программирование
    Ответов: 20
    Последнее: 11.02.2011, 11:57
  3. Запуск STS из .sna, сгенерированного sjasmplus.
    от siril в разделе Программирование
    Ответов: 7
    Последнее: 11.10.2010, 21:33
  4. Breakpoints в связке Sjasmplus+UnrealSpeccy
    от Kurles в разделе Программирование
    Ответов: 19
    Последнее: 26.01.2009, 12:36
  5. Disturbed COverMAnia ( music disk with z00m music collection)
    от kyv в разделе Музыка
    Ответов: 10
    Последнее: 27.03.2008, 10:01

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •