User Tag List

Показано с 341 по 350 из 699

Тема: SjASMPlus от z00m

Древовидный режим

Предыдущее сообщение Предыдущее сообщение   Следующее сообщение Следующее сообщение
  1. #10

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

    По умолчанию

    yes... In default sjasmplus syntax `sub a,e` is `sub a : sub e` .... (but `sbc a,e` is `sbc a,e`!). That's multi-argument feature of sjasmplus (vs Zilog official syntax, which is ... unfortunate... in some cases).

    I did add option `--syntax=a` to modify the "multi-argument" separator from "," to ",," ... then the `sub a,e` becomes single `sub e`.
    But it's still possible to write multi-arg form with double-comma: `ld a,(hl) ,, (bc),a` ... still difficult to review such code and not recommended, but at least it makes it less surprising when converting asm from other syntax to sjasmplus.

    I recommend to use "--syntax=abf" for new sjasmplus projects ... that means:
    "a" for double-comma for multi-arg
    "b" to report parentheses around expression when no memory access is allowed (`ld b,(mylabel+4)` is error, must be `ld b,mylabel+4` if it is not bug)
    "f" is to report any fake instruction with warning (you can then suppress the warning with ";ok" or ";fake", if you really want the fake instruction)

    That's mostly helpful for people who are returning to Z80 assembly after many years and they may not remember subtle details like that the official Zilog syntax is `sub e`, but `sbc a,e` and that `ld b,(adr)` or `sub hl,de` does not exist at all... but I'm using the same options even for my own sources, and I'm not complete Z80 beginner...

    Anyway, pick it or leave it, it's your choice, but the `sub a,e` case was notorious issue among cz/sk Speccy coders, forgetting which of the two (sub vs sbc) requires two arguments. So after some thinking I decided to not modify default sjasmplus, but add extra option to add the double-comma way.

    edit: if you are migrating old project from other assembler to sjasmplus, comparing the binary for different bytes is the simple way to verify if the conversion is correct... Then you can search in the listing file the area which is different and check what line is producing the different machine code. I did use this when I was helping to migrate one big MSX project from tniasm to sjasmplus.
    Последний раз редактировалось Ped7g; 16.08.2020 в 02:23.

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

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

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

Ваши права

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