Важная информация

User Tag List

Страница 5 из 5 ПерваяПервая 12345
Показано с 41 по 45 из 45

Тема: sjasmplus от z00m

  1. #41
    Master Аватар для Bedazzle
    Регистрация
    02.05.2015
    Адрес
    г. Таллин, Эстония
    Сообщений
    798
    Благодарностей: 154
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    you can process it in LUA script

    ...

    This feels like some unfinished business on the sjasmplus side
    I'll better go without LUA - thus way source is more portable.
    Thank you for your efforts!

  2. #42
    Junior
    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    12
    Благодарностей: 8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    About being portable... even if I add string operators later, it will not compile in any older/other version of sjasmplus, so as long as we are talking about _VERSION define, the double-warning about overflow seems to be best compromise at this moment

    (or putting the string into memory first and read it from there per words, but that feels to me a bit more ugly than initial warnings... although if you do such processing only at start of source, and set up your own defines to distinguish between versions, and you are allergic to warnings, this is still viable option (I think {} works also in other version of sjasmplus? Was already part of Aprisobal's source if I recall it correctly)).

    EDIT: the real issue is, that sjasmplus assembly has no data types and pretty much everything is 32bit number except "DB/DZ/.." directives, which will break down strings into separate bytes. So giving user pre-defined _VERSION="1.13.0" is sort of bad joke, because there're very limited ways how to process such value, but that's now "legacy", so there's no simple way out of it.
    Последний раз редактировалось Ped7g; 20.05.2019 в 11:16.

  3. #43
    Guru Аватар для NEO SPECTRUMAN
    Регистрация
    22.05.2011
    Адрес
    Дзержинск
    Сообщений
    2,465
    Благодарностей: 425
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    The {} operator is undocumented "read word from device memory at assembly time"
    Сколько раз он мне был нужен раньше...
    проверил работает в 3-х разных sjasm-ах
    разных производителей
    очень даже полезная вешь

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

    Ped7g, а как насчет разделение коментарием через перенос?
    Код:
    defarray jgvbn 0,1,2,3,4,5 /*
                 */5,4,3,2,1,0
    Последний раз редактировалось NEO SPECTRUMAN; 20.05.2019 в 11:29.

  4. #44
    Junior
    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    12
    Благодарностей: 8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    Ped7g, а как насчет разделение коментарием через перенос?
    Код:
    defarray jgvbn 0,1,2,3,4,5 /*
                 */5,4,3,2,1,0
    I don't like it, both in style way, and in the internal implementation way.

    I was already checking few weeks back, if it would make sense to add the common C/shellscript/.. way of using backslash at end of line, and I can't recall the details now, but the implementation with current sjasmplus internals wouldn't be particularly easy. The block comment proposal is pretty much the same thing, so it would run into the same problems, and it's even less intuitive than backslash (at least for C programmers), seems like bigger "hack".

    So some way to "add" to DEFARRAY is lot more preferred, long multi-line feature is more complicated. There are fixed-size 2048 chars buffers all around the code, and even if you overcome that, there are some things like macro/dup reading the source into string-linked-list buffers of their own, so adding backslash for multi-line would need changes on several places of code, while adding "DEFARRAYADD" is almost single short new-block of code, without risk of breaking some complex state in parsing... Actually I'm mentally still in the process of trying to simplify the line parsing / file reading (to have less code paths and fewer code duplicities), maybe after I will give up on that, I will check again for adding backslash feature, but I don't see much pressure for it. This DEFARRAY is first clear case where it would really help, but most of the other cases can be avoided in reasonable way.

    So at this moment the "add" variant has much higher chance, I will maybe try it today if I will find some time along work.

  5. Этот пользователь поблагодарил Ped7g за это полезное сообщение:
    NEO SPECTRUMAN (20.05.2019)

  6. #45
    Junior
    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    12
    Благодарностей: 8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    "DEFARRAY+" in github (for next release or if you are building from sources)...
    docs: http://z00m128.github.io/sjasmplus/d..._defarray_plus

    Example:
    Код:
        DEFARRAY   myarray 'A', 'B', 'C'
        DEFARRAY+  myarray 'D', 'E'            ; now "myarray" has 5 items
        DUP 3 : DEFARRAY+ myarray '!' : EDUP   ; "DEFARRAYFILL" adding 3x '!'
    As expected, implementing this was quite simple... (for "FILL", if you really need it, just create macro like that DUP in example, but I don't expect it to be needed by 99% of users, so I didn't add it natively)

    (but precise targetted overwrite on "from-to" indices would be quite a pain, as internally it's not array, but one direction linked list ... and I don't believe you truly need that, need to see real world case like that, but it sounds like typical "code smell")
    Последний раз редактировалось Ped7g; 20.05.2019 в 20:54.

Страница 5 из 5 ПерваяПервая 12345

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

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

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

Похожие темы

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

Ваши права

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