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)

    По умолчанию

    Цитата Сообщение от breeze Посмотреть сообщение
    nop. SjASMPlus Z80 Cross-Assembler v1.18.3
    I think it physically cannot detect trailing spaces, since the text in this case is not in quotes.
    I'm really failing to replicate this:
    Код:
    ped@ped7g-sb:~$ sjasmplus-1.18.3 --version
    SjASMPlus Z80 Cross-Assembler v1.18.3 (https://github.com/z00m128/sjasmplus)
    ped@ped7g-sb:~$ sjasmplus-1.18.3 - --msg=lst
        define    appName testapp                    ; Краткое название приложения
        LUA ALLPASS
            sj.insert_define("SAVEPATH", '"install/bin/' .. sj.get_define("appName") .. '1"')
        ENDLUA
        db SAVEPATH
    # file opened: console_input
    1     0000                  define    appName testapp                    ; Краткое название приложения
    2     0000                  LUA ALLPASS
    3     0000 ~                    sj.insert_define("SAVEPATH", '"install/bin/' .. sj.get_define("appName") .. '1"')
    4     0000                  ENDLUA
    5     0000 69 6E 73 74      db "install/bin/testapp1"
    5     0004 61 6C 6C 2F
    5     0008 62 69 6E 2F
    5     000C 74 65 73 74
    5     0010 61 70 70 31
    6     0014
    # file closed: console_input
    I know this is not important for you, but makes me wonder what is happening and if there is some other bug in sjasmplus, that's why I'm poking into this detail. The trailing spaces should be now removed from DEFINEs. Maybe you have the DEFINE in some other code path like IF/ENDIF block or inside MACRO, or I don't know... interesting. If you will find some time, can you try to produce full example where v1.18.3 fails to remove the trailing space? Thank you.

    About string operators in sjasmplus - there are none, unfortunately. For any complex string manipulation the best way is to use lua script. The hack to figure out length by `ORG` macro is usable when in DEVICE mode, but would ruin the output in raw/OUTPUT mode (although you can open OUTPUT file for rewrite and rewind position back, I would probably rather opt for lua solution instead).

    Macro arguments to lua -> definitely possible, there is some test/example somewhere... Check this test in particular and whole folder "lua_examples" and maybe also "macro_examples": https://github.com/z00m128/sjasmplus...macro_arg2.asm
    Not sure if it will answer all your questions/issues, but maybe you will be able to pick up some trick or two.

    I'm following this conversation a bit half-minded as I'm focusing on some work stuff, so in case you are waiting for some example from me or you are stuck with final version of your attempt, post that as new post clearly saying you expect specific help from me, otherwise I may miss it (right now I think you are trying to resolve it all yourself, so I'm giving you just pointers where to look, not preparing any full example).

    EDIT: actually going through that example, that's not useful for string manipulation... the older https://github.com/z00m128/sjasmplus..._macro_arg.asm is then probably more relevant, but I'm still not sure how well the string is passed through, I would have to write some actual code and test it to be 100% sure how it works. "It should be possible" is all I can say at this moment.
    Последний раз редактировалось Ped7g; 19.11.2021 в 14:31.

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

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

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

Ваши права

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