User Tag List

Страница 33 из 70 ПерваяПервая ... 293031323334353637 ... ПоследняяПоследняя
Показано с 321 по 330 из 699

Тема: SjASMPlus от z00m

  1. #321

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    meanwhile, if you have this construct in separate module, consider to switch off warnings globally by `--msg=err` level, producing only errors,
    ну глобально я оно отключить не могу
    так как у меня выводятся и мои важные предупреждения средствами lua (по крайней мере я так думаю : )
    да и у меня тонны ошибок в коде...

    так что я пока побуду на 1.15.0
    пока не добавится ;ok

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

    так же мне недавно попадалось


    на нескольких вот таких таблицах на 256 значений

    Код:
    	pulse_frq2 = {}
    					
    	pulse_frq2[0] = ((0.50001545147716300 * pulse_fundamental_mlt) + (0.54171988752370500 * pulse_harmonic_mlt))
    	pulse_frq2[1] = ((0.49965567733372600 * pulse_fundamental_mlt) + (0.51692156470823500 * pulse_harmonic_mlt))
    	pulse_frq2[2] = ((0.49929590319028900 * pulse_fundamental_mlt) + (0.51590447856727700 * pulse_harmonic_mlt))
    	....

    правда все решилось
    добавлением endlua lua allpass посредине

  2. #322

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

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    так же мне недавно попадалось
    yes, the total buffer for lua text script to be executed is about 32kiB. I was refactoring this just for v1.15.1 to make it constant in the source, so if you are building sjasmplus from source, you should easily find the new constant and raise it (and disable the allpass warning), but I think you use only the binaries.

    I'm not sure if, and by how much I should raise the script length limit, as I have little idea what limits are on the lua side (on sjasmplus side it's all about heap memory, so I can probably allocate also 10 or 100MB without issue on modern PC). Also the buffer is fixed size, allocating for every script in full length, but maybe I can check C++ `std::string` performance characteristics to see if it does deal with `append` effectively, not putting any fixed limit on the usage at all, leaving that to dynamic string allocator. Or maybe I can just use `std::vector` for this too.

    There's lot of sjasmplus source which is not using basic C++ idioms and doing things manually like in C, but I never had time to rewrite some parts just to make them more C++, as I always have to hunt some bug or add feature, and also it took time to have enough test coverage to make such source rewrite reasonably safe (without test coverage the risk of breaking old stuff is too high). So maybe one day... ... in sjasmplus v2.x ...

  3. #323

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    but I think you use only the binaries.
    так и есть
    собирать sjasm-ы пока не научились

  4. #324

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    `if 1 <= aaa && aaa <= 3`
    or
    `if 1 == aaa || 2 == aaa || 3 == aaa`
    это конечно хорошо
    но хотелось бы использовать вот так

    Код:
    	if super_mega_very_long_and_big_stupid_variable_maybe_not = 0 || 1 || 5 || 7
    	nop
    	endif
    или так
    Код:
    	if super_mega_very_long_and_big_stupid_variable_maybe_not = (0 || 1 || 5 || 7)
    	nop
    	endif
    а приходится делать так

    что абсолютно не читаемо
    Код:
    	if super_mega_very_long_and_big_stupid_variable_maybe_not = 0 || super_mega_very_long_and_big_stupid_variable_maybe_not = 1 || super_mega_very_long_and_big_stupid_variable_maybe_not = 5 || super_mega_very_long_and_big_stupid_variable_maybe_not = 7
    	nop
    	endif

    еще могу предположить что кому нибудь может понадобиться такая конструкция
    Код:
    	if var_a || var_b || aaa || bbb = 1
    - - - Добавлено - - -

    так же только что нашел такую ошибку
    коментарий написанный впритык уничтожает endif
    сходу и не ясно где ошибка и почему

    выдает такое
    error: Label not found: label2
    error: [IF] No ENDIF

    Код:
    aaa = 3
    
    		jp label
    				
    		if aaa = 3
    		nop
    		endif
    label
    
    		jp label2
    		
    		if aaa = 0
    		nop
    		endif;	
    label2
    Последний раз редактировалось NEO SPECTRUMAN; 10.07.2020 в 17:14.

  5. #325

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

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    так же только что нашел такую ошибку
    коментарий написанный впритык уничтожает endif
    thanks, I will take a look on it, I guess it's about the cloned-parser-code used to parse some special cases like `endif/endlua/....` and similar, not using the main regular parser, so I guess every of those cloned ones is small original and not behaving the same way as regular, I will have to review them all.


    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    но хотелось бы использовать вот так
    The proposed syntax is already valid in sjasmplus, but has different meaning. The logical or is logical or.

    But I get your idea, I will try to search for some nice common way how these things are done, the C++ doesn't have built-in operator for this kind of calculation IIRC, but some languages have them...

    I think possible syntax may be like:
    Код:
      IF long_expression isfrom(0, 1, 5, 7)
      ENDIF
    I just can't recall what are the common names in other languages for such operator, and I need to check what kind of "array" enclosing is best fit for sjasmplus syntax, I think I can even go with`isfrom[0, 1, 5]` using brackets (I'm a bit worried about parentheses), the brackets can clash only with DEFARRAY, which should be quite safe usage, unless you decide to do `DEFARRAY isfrom`

    BTW, if your "very long label" contains only very limited amout of numbers, like 20 to 29, you can in current/old sjasmplus use the DEFARRAY lookup-table trick:
    Код:
    very_long_label = 20
      DEFARRAY nextIfCheck 1, 1, 0, 0, 0, 1, 1, 0, 0, 0  ; true for: 20, 21, 25, 26
      DUP 10
        IF nextIfCheck[very_long_label - 20]
            DISPLAY /D, very_long_label, " -> true"
        ELSE
            DISPLAY /D, very_long_label, " -> false"
        ENDIF
    very_long_label = very_long_label + 1
      EDUP

  6. #326

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

    По умолчанию

    Tried to search for something similar in other languages, but nothing precisely fits sjasmplus current syntax, so I'm leaning toward "in_array" operator:
    Код:
      ; "in_array" operator:
    
      ; variant with literal array directly in the expression
        ; syntax: <expression> in_array [0, 1, 4, 5]
          ; result is -1 when <expression> evaluates to 0, 1, 4, 5
          ; result is 0 when <expression> evaluates to anything else
    
      ; variant with array defined by DEFARRAY
        ; syntax: <expression> in_array <defarray name>
          ; result is -1 when <expression> does match (evaluated!) value in DEFARRAY
          ; result is 0 when <expression> evaluates to anything else
    
     ; examples:
      IF (very_long_label % 33) in_array [0, 1, 5, 7]
      ENDIF
      DEFARRAY freeday 6, 7
    weekday = 2  ; tuesday
      IF weekday in_array freeday
        ; not hit
      ENDIF
    weekday = 7  ; sunday
      IF weekday in_array freeday
        ; *hit*
      ENDIF
    I need to review it a bit more to make sure this doesn't clash with current syntax in any edge-case, but so far it looks good to me and should be possible to implement it.

    Any comments before I add it?

  7. #327

    Регистрация
    02.05.2015
    Адрес
    г. Таллин, Эстония
    Сообщений
    1,691
    Спасибо Благодарностей отдано 
    302
    Спасибо Благодарностей получено 
    223
    Поблагодарили
    159 сообщений
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    I just can't recall what are the common names in other languages for such operator
    For example, Python:

    Код:
    if variable in (1,2,3):
       ...
    Heavy on the disasm
    Eric and the disasm
    Mask 3: Venom strikes disasm
    Bard's disasm

    Этот пользователь поблагодарил Bedazzle за это полезное сообщение:

    Ped7g(11.07.2020)

  8. #328

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

    По умолчанию

    Цитата Сообщение от Bedazzle Посмотреть сообщение
    For example, Python
    Thinking about using "in" instead of "in_array" (this one is from PHP), but "in" is already Z80 instruction, so it's adding to the visual ambiguity when reading the source (it's not a direct clash for assembler, as it's instruction vs operator, but I think I will prefer "in_array" any way, to make it distinct even at first look).

  9. #329

    Регистрация
    02.05.2015
    Адрес
    г. Таллин, Эстония
    Сообщений
    1,691
    Спасибо Благодарностей отдано 
    302
    Спасибо Благодарностей получено 
    223
    Поблагодарили
    159 сообщений
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    Thinking about using "in" instead of "in_array" (this one is from PHP), but "in" is already Z80 instruction, so it's adding to the visual ambiguity when reading the source (it's not a direct clash for assembler, as it's instruction vs operator, but I think I will prefer "in_array" any way, to make it distinct even at first look).
    if variable from (1,2,3,4,5)

    ?
    Heavy on the disasm
    Eric and the disasm
    Mask 3: Venom strikes disasm
    Bard's disasm

  10. #330

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

    По умолчанию

    https://github.com/z00m128/sjasmplus...es/tag/v1.16.0
    * predefined defines extended with new ones (like __BASE_FILE__ or __LINE__)
    * relocation data generator (inspired by SymbOS executables)
    * some bugfixes/improvements in parser, some warnings are suppressible now

    NEO: now the new lua warning about bytes emitted without "allpass" should be suppressible (you can put the "; ok" comment either at the beginning of lua block, or at the end of it, whichever way you prefer, both lines will count).

    Эти 3 пользователя(ей) поблагодарили Ped7g за это полезное сообщение:

    Dart Alver(04.08.2020), NEO SPECTRUMAN(27.07.2020), XoRRoX(04.08.2020)

Страница 33 из 70 ПерваяПервая ... 293031323334353637 ... ПоследняяПоследняя

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

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

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

Ваши права

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