<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Делаем EFLAGS таблицу]]></title><description><![CDATA[<p dir="auto">Таблица флагов нужна для определения срабатывания условного прыжка в пошаговой отладке<br />
<img src="/assets/uploads/files/1680390637635-8d7c71bd-be7f-45d5-85c8-7065520c965c-%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png" alt="8d7c71bd-be7f-45d5-85c8-7065520c965c-изображение.png" class=" img-fluid img-markdown" /><br />
<img src="/assets/uploads/files/1680390644037-6ad9a581-7655-44b3-a163-52849b60de83-%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png" alt="6ad9a581-7655-44b3-a163-52849b60de83-изображение.png" class=" img-fluid img-markdown" /></p>
<pre><code>function ToBits(num, bits)
	local t = {}
	for b = bits, 1, -1 do
		rest = math.fmod(num,2)
		t[b] = math.floor(rest)
		num = (num-rest)/2
	end
	
	if num == 0 then
		return t
	else
		return {'Not enough bits to represent this number'}
	end
end

local bitsTable = ToBits(EFLAGS, 16)

local tableEFLAGS =
{
	OF = bitsTable[17-12],
	DF = bitsTable[17-11],
	SF = bitsTable[17-8],
	ZF = bitsTable[17-7],
	AF = bitsTable[17-5],
	PF = bitsTable[17-3],
	CF = bitsTable[17-1]
}

for k,v in pairs(tableEFLAGS) do
	print (k..' = '..v)
end

print(EFLAGS)
local s = ''
for i=1,#bitsTable do
	s = s..bitsTable[i]
end
print(s)
</code></pre>
]]></description><link>https://celua.ru/topic/32/делаем-eflags-таблицу</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 03:22:00 GMT</lastBuildDate><atom:link href="https://celua.ru/topic/32.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Apr 2023 23:11:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Делаем EFLAGS таблицу on Sun, 02 Apr 2023 18:22:23 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://celua.ru/topic/33/%D0%BA%D0%B0%D0%BA-%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B6%D0%B0%D1%82%D1%8C-%D0%BA%D0%B0%D1%80%D1%82%D0%B8%D0%BD%D0%BA%D0%B8">Ответил</a></p>
]]></description><link>https://celua.ru/post/69</link><guid isPermaLink="true">https://celua.ru/post/69</guid><dc:creator><![CDATA[MasterGH]]></dc:creator><pubDate>Sun, 02 Apr 2023 18:22:23 GMT</pubDate></item><item><title><![CDATA[Reply to Делаем EFLAGS таблицу on Sun, 02 Apr 2023 07:13:02 GMT]]></title><description><![CDATA[<p dir="auto">Как ты изображение вставил? Пользователям будет интересно. Иногда надо скриншот показать в место ссылки.</p>
]]></description><link>https://celua.ru/post/65</link><guid isPermaLink="true">https://celua.ru/post/65</guid><dc:creator><![CDATA[Pitronic]]></dc:creator><pubDate>Sun, 02 Apr 2023 07:13:02 GMT</pubDate></item></channel></rss>