User Tag List

Показано с 351 по 360 из 699

Тема: SjASMPlus от z00m

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

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

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

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    это удвоит видимый размер кода в 2 раза
    который и без того плохо читается
    well... the original sjasmplus design has some limits... but in some cases (in your original example) you can swap the order:
    Код:
    cnt = 0
    
    cnt = cnt + 4 : ld a,b
    cnt = cnt + 7 : and $70
    Because the `ld` and `and` does not use `cnt`, it doesn't matter if you have it ahead/after the instruction. (you can even remove the colon if you like it more without, the parser will parse only valid expression for the "=" (alias DEFL), and then it will try to parse instruction after, but I would personally use colon. (although colon will split it in listing file to two lines, if that is your problem)

    If the ld would be using `cnt`, then you can't swap them easily, but you can do `ld a,cnt-4` to load the "old" value before +4 ... it's ugly, but should work too.

    Wait a second, are you trying to count T-states of instructions? :-o
    That's ... interesting ... looks a bit dumb approach at first sight, but actually may be valid approach. But seems really tedious, omg. I wouldn't want to create this manually.
    But in such case you can leave the T-state counter at beginning of the line, if you indent the instructions enough, it may be even not-that-bad on reading the source.

    But makes me wonder if it would be better to somehow calculate it, but there's no simple way. Even if you would create some horrible macro to calculate T-states of particular block reading the device memory, it's valid only in pass3, so for first two passes the calculated T-states would be 0 all the time, ruining the conditional assembling of later blocks.

    Other option is to use the IDE/editor plugin to calculate the T-states for selected block (there's Z80 meter plugin for VSC doing this), and do the cnt = cnt + XYZ after full block adding just one total number.

    Either way, feels a bit messy, but I have no better workaround for you.

    -------------------------

    About binary DISPLAY, how about:
    Код:
        DISPLAY "value ",/B,123
    
    --> outputs:
    
    > value %0111'1011
    I'm not sure about the group-separator in the middle... the C++ syntax is apostrophe (also supported by sjasmplus), but if you will later parse such data in Excel or something, the apostrophes will probably derail the tool a lot... then again you can always use `sed` to remove them from the log before processing it further, and the separator helps to find the 4bit group... So I guess I will do it like this, with the separator.

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

    NEO SPECTRUMAN(24.08.2020)

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

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

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

Ваши права

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