User Tag List

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

Тема: SjASMPlus от z00m

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

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

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

    По умолчанию

    About LUA approach: if it's "complete" block of code, you can extract the if/def logic into lua, emitting only instructions
    I guess I have some idea why it fails like this, and I think I was already fixing similar case for something else? Can't remember... I may take a look later if it's possible to make similar LUA code generator work, your idea seems valid to me.

    About defarray: I really don't want to, that feels like can of worms being opened ... defines feel to me more like C preprocessor than actual script language
    when you write "the_array[1] = 4", the line is substituted very early right after reading buffered input into "3 = 4", then are the directives/instructions being parsed. What you propose would require to parse this array-assignment directive ahead of substitution, adding like whole new step in the compiling "pipeline". Maybe it would work well (or maybe it would backfire later), but it really feels like changing defines into something what they are not.

    About memory approach: {0} = 3 is `ORG 0 : DW 3`, so this part is not a problem, but the `IF` part is problem, because pass1 and pass2 will see {$4000} as 0, only in pass3 there will be real value... Thinking what you did want to achieve originally, this will not work either.

    As long as only fixed control variables are involved like "aaa", you can do that in the asm like:
    Код:
    aaa = 3
    bbb = $c0
       dup 10
         if aaa = 5 : db $ff : endif
         db bbb+aaa
    aaa = aaa + 1
    bbb = bbb -  $10
      edup
    But if you want "array" of control variables, then I'm afraid currently you must elevate *all* the logic into Lua, and write full code generator in Lua, can't think of good hack how to do that in asm/define way.

    I will take a look if there's a way to fix IF/ENDIF emitted by _pc from Lua script ... that sounds like something what "should" work, if you don't know the sjasmplus internals, and you just follow the documentation, so fixing this would be good. But it may be too difficult.

    I believe you can actually make that work if you will emit whole IF->ENDIF block into _pc/_pl, i.e. _pc("if aaa = 0 : db 1,2,3,4 : endif") -> that MAY work?
    But I'm not sure if it is enough for you to resolve all your issues.

    EDIT: the colons will actually break _pc, right? sorry, I don't have time to try it now, I have really urgent work project upon me, so sorry if my advice is broken. Will take second look later, when I will be more free from work.

    - - - Updated - - -

    https://github.com/z00m128/sjasmplus...es/tag/v1.13.2

    v1.13.2 changelog:
    - OPT has now also "listoff" and "liston" commands
    - added to --syntax option: case insensitive instructions, "bBw" added/changed
    - new macro examples, minor fixes and refactoring
    - SAVETRD implementation refactored (more checks, less bugs, "replace" file feature)
    - operators "{address}" and "{b address}" are now official and documented

    Documentation http://z00m128.github.io/sjasmplus/documentation.html (or in the package/cloned source).
    Последний раз редактировалось Ped7g; 03.07.2019 в 08:42.

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

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

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

Ваши права

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