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)

    По умолчанию

    Цитата Сообщение от breeze Посмотреть сообщение
    И стало понятно, что это из-за комментария, в конце define, нельзя так делать XD
    those trailing spaces due to comment shouldn't happen since v1.18.2, so you are probably at older version of sjasmplus? It makes things easier when you specify version of sjasmplus when reporting some issue.

    You can also trim/add quotes in lua script, but I never remember lua syntax from head, so I would have to google the lua tutorials to find the string operators and how to do it.

    There also does exist:
    Код:
    --outprefix=<path>       Prefix for save/output/.. filenames in directives
    It's not super smart and it can break quite easily too but it may cover some use cases, so in your case something like `--outprefix=/dir1/dir2/dir3/` would affect the `SAVEBIN appName` from first post (notice the trailing slash in the option). But it would affect also many other output commands, so not sure if this is helpful in your case.

    Let me know if I should produce some lua example doing also the quotes stripping/adding, maybe I even have it somewhere in tests, I think I recall something like that, but I'm not sure.

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

  3. #2

    Регистрация
    11.02.2005
    Адрес
    【RB】
    Сообщений
    3,877
    Спасибо Благодарностей отдано 
    130
    Спасибо Благодарностей получено 
    131
    Поблагодарили
    81 сообщений
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Цитата Сообщение от Ped7g Посмотреть сообщение
    those trailing spaces due to comment shouldn't happen since v1.18.2, so you are probably at older version of sjasmplus?
    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.

    Цитата Сообщение от Ped7g Посмотреть сообщение
    It makes things easier when you specify version of sjasmplus when reporting some issue.
    Well, this is not really an issue, rather a flaw.

    Цитата Сообщение от Ped7g Посмотреть сообщение
    You can also trim/add quotes in lua script, but I never remember lua syntax from head, so I would have to google the lua tutorials to find the string operators and how to do it.
    Well, I'll keep in mind. But in this situation, it is easier to move the comment to another line.

    Цитата Сообщение от Ped7g Посмотреть сообщение
    There also does exist:
    Код:
    --outprefix=<path>       Prefix for save/output/.. filenames in directives
    It's not super smart and it can break quite easily too but it may cover some use cases, so in your case something like `--outprefix=/dir1/dir2/dir3/` would affect the `SAVEBIN appName` from first post (notice the trailing slash in the option). But it would affect also many other output commands, so not sure if this is helpful in your case.
    As a single solution yes, but I have a multi-assembly and may have different paths and filenames.

    Цитата Сообщение от Ped7g Посмотреть сообщение
    Let me know if I should produce some lua example doing also the quotes stripping/adding, maybe I even have it somewhere in tests, I think I recall something like that, but I'm not sure.
    Okay, I'll try to implement this solution.

    It would be very nice to get closer interaction between variables inside a macro and the results of LUA execution.

    - - - Добавлено - - -

    Есть ещё вопрос по макросам. Как получить длину передаваемой строки внутри макроса?

    Например:

    Код:
    print "Loooooooong text string!"
    
    MACRO print text
    
    вот чему тут равна длина строки text?
    
    ENDM
    Длину строки можно получить с помощью LUA:

    string.len(text)

    Но как получить доступ к переменной макроса?

    Можно было бы временно сохранить с помощью:

    DEFINE text_ text

    и уже внутри LUA достучаться:

    sj.get_define("text_")

    но вместо значения переменной text, мы получаем просто слово «text».

    Чёт прям замкнутый круг какой-то. Может есть какой-то спецсимволы, что бы передать значение?

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

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

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

Ваши права

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