User Tag List

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

Тема: SjASMPlus от z00m

Древовидный режим

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

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

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    а на каком pass-е уже будет результат?
    так как полученные цифры еще будут передаваться lua для расчета таблиц
    Macros are like "includes", expanded upon instance in every pass (becoming part of source). Notice how inside my example macro "CN=CN+(cycles?)" -> the argument is in parentheses - that's because the macro arguments are substituted in C-preprocessor way, substituting the strings, doing the value evaluation as last step after all substitutions, so without parentheses the usage `countT (26-CN+3)&-4` does expand to `CN=CN+(26-CN+3)&-4` which will evaluate to different result as `CN=CN+((26-CN+3)&-4)`! So it's similar landmine field like C #defines ...

    But the value of symbol CN is updated in every pass, just as if you would do the CN=CN+4 at beginning of line (but it happens after instruction, because macro is expanded after instruction).

    ---------------

    listing disabling:
    http://z00m128.github.io/sjasmplus/d...on.html#po_opt
    Код:
        OPT push listoff    ; preserve current state of listing, and switch listing off
          ; some code without listing (only marked by "# listing disabled" and "# listing enabled" lines in listing)
          ...
        OPT pop              ; restore the listing to original state
    (the disabling/enabling of listing is announced in the listing file, so this shortens listing for blocks of code, for single line this will explode listing even more)

    the OPT state can be push/pop-ed, so you can even nest these in includes/etc... if the top level has listing enabled, and it will go through multiple nested blocks having this switch off, then the first will switch listing off, nested ones will make no visible change, and the final last `opt pop` will restore listing back to "on".

    Similarly if you are doing sjasmplus library to be included as source code, and you want customize the syntax, but you don't want to affect project which is including your source, you can do `OPT push reset --syntax=aBf` to have your source going by these rules, then `OPT pop` at end of your library to restore the syntax of original project...

    Sorry for spamming you with this info you didn't ask for, but I'm kinda proud of the OPT design... :P
    Последний раз редактировалось Ped7g; 24.08.2020 в 10:52.

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

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

Эту тему просматривают: 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

Ваши права

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