<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875357</guid>
        <pubDate>Mon, 05 Sep 2022 02:20:12 +0000</pubDate>
        <title>Любителям VSCodium + Fasm</title>
        <link>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875357</link>
        <description><![CDATA[Majestio: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=429594&view=findpost&p=3875356'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>macomics &#064; <time class="tag-quote__quoted-time" datetime="2022-09-05T00:27:24+03:00">04.09.22, 21:27</time></span><div class='quote '>3) точка-с-запятой &quot;не часть комментария&quot;</div></div><br>
Тут скорее нет, чем да. Ибо первое вхождение ; &quot;не-в-строке&quot; и &quot;не-в-символе&quot; - уже есть &quot;начало комментария&quot;, а дальше пофик.]]></description>
        <author>Majestio</author>
        <category>Assembler</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875356</guid>
        <pubDate>Sun, 04 Sep 2022 21:27:24 +0000</pubDate>
        <title>Любителям VSCodium + Fasm</title>
        <link>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875356</link>
        <description><![CDATA[macomics: Еще<br>
3) точка-с-запятой &quot;не часть комментария&quot;<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">;;;;;;;;;;;;;;;</div><div class="code_line">; комментарий ;</div><div class="code_line">;;;;;;;;;;;;;;;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>macomics</author>
        <category>Assembler</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875355</guid>
        <pubDate>Sun, 04 Sep 2022 19:08:23 +0000</pubDate>
        <title>Любителям VSCodium + Fasm</title>
        <link>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875355</link>
        <description><![CDATA[Majestio: <span class='tag-size' data-value='14' style='font-size:14pt;'><strong class='tag-b'>Внимание&#33; Achtung&#33; Небезпека&#33;</strong></span><br>
<br>
Прошу помощи. Как-то подумалось, что моя реализация форматировщика в плане форматирования комментариев &quot;сырая&quot; до безобразия. Надо это исправить. Пока ищется первое вхождение ASCII символа ; и это считается началом комментария. Что, собственно, совсем не есть правильно. Ибо нужно учитывать контекст.<br>
<br>
Ну оч прошу дополнить варианты для обработки и последующих тестов: <br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">hello1 db &#39;hello ; world!&#39;,0 </div><div class="code_line">hello2 db &quot;hello ; world!&quot;,0 </div><div class="code_line">hello2 db &quot;hello &#39;;&#39; world!&quot;,0 </div><div class="code_line">mov al , &#39;;&#39;</div><div class="code_line">???</div></ol></div></div></div></div><br>
Я так понимаю, чтобы корректно определить начало комментария, нужно выяснить две вещи:<br>
<br>
1) Точка-с-запятой &quot;не в строке&quot;<br>
2) Точка-с-запятой &quot;не ASCII символ&quot; в команде<br>
<br>
Вощем, жду ваших мыслей  :lol:]]></description>
        <author>Majestio</author>
        <category>Assembler</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875279</guid>
        <pubDate>Sat, 03 Sep 2022 06:57:49 +0000</pubDate>
        <title>Любителям VSCodium + Fasm</title>
        <link>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875279</link>
        <description><![CDATA[Majestio: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=429594&view=findpost&p=3875278'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>macomics &#064; <time class="tag-quote__quoted-time" datetime="2022-09-03T06:53:33+00:00">03.09.22, 06:53</time></span><div class='quote '>Вот только import и library в fasm1 это имена макроинструкций и они могут меняться по желанию.</div></div><br>
Ну я понимаю. Я написал, что в принципе не хватает норм разделений на группы раскрасок.<br>
<br>
ADD: И да - изначальная редакция форматировщика, да и мои правки - не предусматривают &quot;иерархического кода&quot;, типа:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">.IF (BYTE PTR [esi]) == bl</div><div class="code_line">&nbsp;&nbsp; .IF ($invoke(CheckSignature, $invoke(GetCurrentProcess), OFFSET szKernel32, OFFSET szIsDebuggerPresent, OFFSET IsDebuggerPresentSignature, 14))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;inc BYTE PTR [edi]</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;inc ebp</div><div class="code_line">&nbsp;&nbsp; .ELSE</div><div class="code_line">&nbsp;&nbsp; ...</div></ol></div></div></div></div><br>
ИМХО, это уже на ассемблер - не пользуйтесь форматировщиком, а лучше пишите сразу на Си :yes:]]></description>
        <author>Majestio</author>
        <category>Assembler</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875278</guid>
        <pubDate>Sat, 03 Sep 2022 06:53:33 +0000</pubDate>
        <title>Любителям VSCodium + Fasm</title>
        <link>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875278</link>
        <description><![CDATA[macomics: Вот только import и library в fasm1 это имена макроинструкций и они могут меняться по желанию. Хотя слово import - это еще и флаг типа секции в формате PE/PE64.<br>
<br>
А вот про слова extrn или public - забыли.<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><strong class='tag-b'>&quot;match&quot;: &quot;(?i:(?&lt;=&#092;&#092;s)(?:bank|bankset|limit|protect|write&#092;&#092;s+direct|str|struct|endstruct|ends|invoke|library)&#092;&#092;b)&quot;</strong></div></div><br>
<br>
str - это инструкция процессора, а invoke - имя макроинструкции.]]></description>
        <author>macomics</author>
        <category>Assembler</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875276</guid>
        <pubDate>Sat, 03 Sep 2022 06:20:08 +0000</pubDate>
        <title>Любителям VSCodium + Fasm</title>
        <link>https://forum.sources.ru/index.php?showtopic=429594&amp;view=findpost&amp;p=3875276</link>
        <description><![CDATA[Majestio: Всем привет&#33;<br>
<br>
Сегодня решил настроить свой VSCodium для работы с Fasm. Пока речь идет о плагине подсветки и форматировщике. <br>
<br>
<strong class='tag-b'><span class='tag-size' data-value='14' style='font-size:14pt;'>Форматировщик</span></strong><br>
<br>
В штатном репозитарии его нет. Пришлось искать и ставить &quot;<strong class='tag-b'><span class="tag-color tag-color-named" data-value="green" style="color: green">Assembly Formatter</span></strong>&quot; <a class='tag-url' href='https://marketplace.visualstudio.com/items?itemName=notaflyinggoose.asmformat' target='_blank'>из репы VSCode</a> в виде vsix-файла. Но и это не все. Форматирует, имхо, ну очень коряво - просто отодвигает на табуляцию (делает отступ) все &quot;что не метка&quot;, а комментарии располагает на позиции 30 или далее. Пришлось код форматировщика править &quot;под себя&quot;. Может быть кому-то мой вариант форматирования покажtтся лучшим:<br>
<br>
<ul class="tag-list"><li>Форматировщик с моими правками, кроме меток, еще не отодвигает (делает отступ) еще кучу конструкций, заданных ключевыми словами - format, entry, include, section, import </li><li>Форматировщик с моими правками двигает все комментарии вправо - на позицию самого &quot;дальнего&quot; комментария, а можно вообще отключить форматирование комментариев</li></ul><br>
В принципе, это уже можно править под себя. Делается все это просто. Сперва ставим этот форматировщик из vsix-файла (ссылка есть вверху по тексту). Потом находим файл от корня установки VSCodiun &quot;<strong class='tag-b'>data/extensions/notaflyinggoose.asmformat-1.0.0/extension.js</strong>&quot; и заменяем моим, который я прикреплю к данному сообщению. Настройка ключевых слов, которые остаются при форматировании без отступа, а также настройка включения/отключения форматирования комментариев - делаются прямо в этом файле (строки 2 и 3). После правки файла - обязателен перезапуск VSCodium.<br>
<br>
<strong class='tag-b'><span class='tag-size' data-value='14' style='font-size:14pt;'>Плагин подсветки</span></strong><br>
<br>
Его мы берем из штатного репозитария. Называется он &quot;<strong class='tag-b'><span class="tag-color tag-color-named" data-value="green" style="color: green">ASM Code Lens</span></strong>&quot;. К нему тоже есть претензии&#33; Для Fasm он как то слабо заточен. Группы подсветки на сей момент: comments, keywords, strings, mnemonics, numbers, labels. Можно было бы в вместо &quot;keywords&quot; с делать группу &quot;opcodes&quot;, а из группы &quot;mnemonics&quot; сделать набор &quot;keywords1...keywords5&quot;. Ну да ладно. Возможно потом займусь, если будет острая потребность. Править нужно файл &quot;<strong class='tag-b'>data/extensions/maziac.asm-code-lens-1.10.0/grammar/asm.json</strong>&quot; - так же файл от корня установки VSCodiun. Лично я для себя в <strong class='tag-b'>строке <span class="tag-color tag-color-named" data-value="blue" style="color: blue">83</span></strong> пока просто добавил &quot;library&quot; и &quot;invoke&quot;:<br>
<br>
<strong class='tag-b'>&quot;match&quot;: &quot;(?i:(?&lt;=&#092;&#092;s)(?:bank|bankset|limit|protect|write&#092;&#092;s+direct|str|struct|endstruct|ends|<span class="tag-color tag-color-named" data-value="red" style="color: red">invoke</span>|<span class="tag-color tag-color-named" data-value="red" style="color: red">library</span>)&#092;&#092;b)&quot;</strong><br>
<br>
После правки файла - обязателен перезапуск VSCodium.<br>
<br>
Ну, вощем, как-то так. Может быть кому поможет.<br>
<br>
<span class="b-attach" data-size="2861" data-hits="9" data-attach-id="63860" data-attach-post-id="0">
			<span class="b-attach__title"></span><a class='b-attach-link' href='https://forum.sources.ru/index.php?act=Attach&amp;type=post&amp;id=0&amp;attach_id=63860' title='Скачать файл' target='_blank'>extension.js</a> (, : 9)
		</span>]]></description>
        <author>Majestio</author>
        <category>Assembler</category>
      </item>
	
      </channel>
      </rss>
	