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

User Tag List

Страница 56 из 70 ПерваяПервая ... 525354555657585960 ... ПоследняяПоследняя
Показано с 551 по 560 из 699

Тема: SjASMPlus от z00m

  1. #551

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

    По умолчанию

    Цитата Сообщение от breeze Посмотреть сообщение
    replace code in style LUA 5.3:
    yes, sjasmplus has Lua 5.1.5 ( https://github.com/z00m128/sjasmplus/issues/73 )

    And AFAIK that's the last easy-to-upgrade-to version, anything newer requires a bit more more effort on sjasmplus side, and also there's some stuff I never truly understood how it was produced, and I would need to learn more about lua to resolve it.

  2. #552

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

    Exclamation

    Another day, another intro… macro

    try to create autoreplacement for JR/JP

    Код:
    macro _jpz to
                if $-to<127 or to-$<127
                    jr    z,to
                else
                    jp    z,to
                endif
            endm
    if code like:

    Код:
    label
            _jpz label
    all ok.

    if code like:

    Код:
            _jpz label
    
    label
    got warning — warning[fwdref]: [LUA] forward reference of symbol

    code compiles without errors, but I don't like the warning messages also

  3. #553

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

    По умолчанию

    You can suppress warning if you know the code works as intended, add comment fwdref-ok
    Код:
            macro _jpz to
                if $-to<127 or to-$<127 ; fwdref-ok
                    jr    z,to
                else
                    jp    z,to
                endif
            endm
    and the "to-$<127" can be "to-$<129". Jr is relative to "$+2" and can be -128..+127

    But I would recommend you to not do this, IMHO (and also in my experience), it's lot easier to just use JR everywhere, and then modify it to JP when assembling fails due to range.
    Your macro may cause unstable machine code size and if two+ of these macros keep switching on/off each other, 3-pass assembling is not enough to stabilise the labels, and you may end with invalid machine code (especially with forward reference labels).

    If you are using this, you should have some good way how to test every important build if it is correct and works, and unless you are using some kind of automated tests, it sounds to me like more extra work, than doing jr/jp manually in source. (then again, I usually write very small asm projects where I have no issue to modify 10-20 jump lines by hand and also I know where I want JR and where JP, so your mileage may vary).

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

    vlad-kras(10.12.2021)

  4. #554

    Регистрация
    16.02.2006
    Адрес
    Новосибирск
    Сообщений
    3,280
    Спасибо Благодарностей отдано 
    17
    Спасибо Благодарностей получено 
    91
    Поблагодарили
    54 сообщений
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    а есть ли возможность добавить поддержку команд и режимов памяти Rabbit 2000?
    0A заповедей:
    I. Не удаляй каталог свой.
    II. Не удаляй до времени ни одного файла.
    III. Не кради файлы.
    IV. Не желай программы ближнего своего.
    V. Почитай BDOS и BIOS как родителей своих ...
    ---
    Sprinter resurrect:
    Telegram
    Discord
    Repo
    Forum

  5. #555

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

    По умолчанию

    Цитата Сообщение от Sayman Посмотреть сообщение
    а есть ли возможность добавить поддержку команд и режимов памяти Rabbit 2000?
    да

    but you need somebody who will do it.

    I can help, but I would need somebody with R2000 expertise to explain me differences, which opcodes to add and which to remove, write/check tests and help to design extra syntax to make it useful with the extended memory model, etc..
    Ie. at least one very experienced R2000 coder willing to work on sjasmplus is missing right now.

    From a quick look at docs I'm missing some simple "this is how it differs from Z80" condensed to 1-3 pages, the changes seems to be small, but non-trivial, and after reading like 10 pages of CPU user manual I haven't learned much, except that it's different enough to need serious work to implement.

  6. #556

    Регистрация
    01.03.2005
    Адрес
    Samara
    Сообщений
    4,867
    Спасибо Благодарностей отдано 
    328
    Спасибо Благодарностей получено 
    311
    Поблагодарили
    235 сообщений
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    hello

    Is there a built-in text converter from Unicode to cp1251?
    С уважением,
    Jerri / Red Triangle.

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

  8. #557

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

    По умолчанию

    No, there's almost zero bytes in sjasmplus dealing with encoding, except hard-coded cp1251 to dos-866 conversion, and detection of UTF16/32 BOM bytes at beginning to reject file.

    sjasmplus treats source files as 8bit extended ASCII, (0x00,0x0A,0x0D inside strings have to be encoded as \0,\n,\r and \ itself has to be \\), so what bytes you have in source will be outputted into binary too.

    For converting your regular source editor encoding to target ZX encoding I would suggest using some tool like iconv as part of make rule (or using the target encoding directly in text editor).

  9. #558

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

    Exclamation

    Цитата Сообщение от jerri Посмотреть сообщение
    hello

    Is there a built-in text converter from Unicode to cp1251?
    Use LUA, Luke!

    Можешь воспользоваться моим «черновиком» из CLI2R
    _u.lua.zip


    Добавляешь макрос:

    Код:
    		includelua	"_u.lua"
    
    
    		macro db_u text
    	define _t text
    			lua ALLPASS
    				local str = sj.get_define("_t")
    				str = string.gsub(str, ".?$","")
    				str = string.gsub(str, "^.?","")
    				_u(str)
    			endlua
    	undefine _t
    		endm
    Затем в коде:

    Код:
    		db_u	" © "
    В результате получишь db 127



    Большая часть символов реализована, русские буквы соответствуют cp866, но спецсимволы немного отличаются, при желании коды символов можно поменять на нужные.

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

    Dart Alver(27.02.2022), Ped7g(27.02.2022)

  10. #559

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

    По умолчанию

    That's very nice script, just minor detail:

    Цитата Сообщение от breeze Посмотреть сообщение
    str = string.gsub(str, ".?$","")
    str = string.gsub(str, "^.?","")
    that removes any first and last byte of the argument, if you want that, you can skip regex completely and do the simpler: str = string.sub(str,2,-2)

    or if you want to remove only quotes and do no change to string without quotes, you can use more specific gsub regex: str = string.gsub(str,"^"(.*)"$","%1")

    I would still rather use `iconv` which is more complete and can convert from many encodings to many encodings, and is available almost everywhere in *NIX world (not sure about windows, I guess with win10 and later you can just simply move everything to WSL and use linux inside windows, to avoid all the windows troubles and deficiencies in tools). But if you don't want to depend on external tool, this script is nice and easy to patch if one needs something new or non-standard.

  11. #560

    Регистрация
    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.19.0
    • added Amstrad CPC devices (AMSTRADCPC464, AMSTRADCPC6128) - by Oli Wilkinson
    • added Amstrad CPC save snapshot and CDT (SAVECPCSNA, SAVECDT) - by Oli Wilkinson
    • added SAVE3DOS (like SAVEBIN with +3DOS header)
    • the deprecated "ok" warning suppression is removed, use "<warning-id>-ok" comment or -Wno-...
    • new temporary label suffix syntax _b and _f, enabling them for all expressions
    • fix --longptr mode to keep 32b address when DS 0 is used
    • added fake instructions adc|add|sbc|sub de,bc|de|hl|sp
    • dec|inc|pop|push will accept also single-comma multiarg in --syntax=a mode
    • DUP/REPT will now accept also zero count (skipping the block)
    • DEFL labels can be defined even as late as in last pass
    • bugfixes (macros, listing, file names in errors, SLD reversepop data)


    So Neo can finally abuse the temporary labels to address backward/forward inside macros even with `ld (123_b+1),hl` ...

    Have a great time, and looking forward to new ZX/GB/MSX/CPC/Next productions...

    And thank you all for reporting issues and helping to steer the development, and your feedback. Really happy to read your messages.

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

    Dart Alver(30.03.2022)

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

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

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

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

Похожие темы

  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

Ваши права

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