<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-priority:99;
mso-style-link:"Formátovaný v HTML Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.FormtovanvHTMLChar
{mso-style-name:"Formátovaný v HTML Char";
mso-style-priority:99;
mso-style-link:"Formátovaný v HTML";
font-family:Consolas;}
span.StylE-mailovZprvy20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=CS link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Dobrý den, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Četl jsem, že jste se ptal na At89…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>U PIC.. XC8 to přeloží jako<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>BTFSS byte,bit (BTFSS 0x01,0) <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Nebo<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>BTFSC byte,bit (BTFSC 0xff,7)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jednobytová instrukce, provedení za 4 takty.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hojně užívám.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Míra<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Hw-list [mailto:hw-list-bounces@list.hw.cz] <b>On Behalf Of </b>Martin Záruba<br><b>Sent:</b> Wednesday, April 24, 2024 7:44 PM<br><b>To:</b> Martin Zaruba<br><b>Subject:</b> Jak se přeloží<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Byv vychován assemblerem a zoufalým nedostatkem paměti, vymýšlel jsem, třeba na AT89C4051 různé úsporné formáty.<o:p></o:p></p><p class=MsoNormal>Proměnná b (viz níže) zabírá zjevně jen jeden byte, což lze zjistit snadno přes sizeof(b) a lze do ní uložit 8 ANO/NE, které budou POJMENOVANÉ a tedy srozumitelné. <o:p></o:p></p><p>Můžete někdo zkusit, jak se přeloží na AT Mega tento kód? Zda je rozumné něco takového použít?<o:p></o:p></p><div><div><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> </span><span style='font-size:8.5pt;font-family:Consolas;color:#00979D'>struct</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> </span><span style='font-size:8.5pt;font-family:Consolas;color:#434F54'>{</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'><o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> </span><span style='font-size:8.5pt;font-family:Consolas;color:#00979D'>bool</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> b1:</span><span style='font-size:8.5pt;font-family:Consolas;color:#005C5F'>1</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'>;<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> </span><span style='font-size:8.5pt;font-family:Consolas;color:#00979D'>bool</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> b2:</span><span style='font-size:8.5pt;font-family:Consolas;color:#005C5F'>1</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'>;<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> </span><span style='font-size:8.5pt;font-family:Consolas;color:#434F54'>}</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> b;<o:p></o:p></span></p></div><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'><o:p> </o:p></span></p><div><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#728E00'>if</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> </span><span style='font-size:8.5pt;font-family:Consolas;color:#434F54'>(</span><span style='font-size:8.5pt;font-family:Consolas;color:#D35400'>b</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'>.</span><span style='font-size:8.5pt;font-family:Consolas;color:#D35400'>b1</span><span style='font-size:8.5pt;font-family:Consolas;color:#434F54'>)</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'> </span><span style='font-size:8.5pt;font-family:Consolas;color:#434F54'>{}</span><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'>;<o:p></o:p></span></p></div><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'><o:p> </o:p></span></p><p class=MsoNormal style='line-height:11.4pt;background:white'><span style='font-size:8.5pt;font-family:Consolas;color:#4E5B61'><o:p> </o:p></span></p></div><pre>Martin Záruba<o:p></o:p></pre></div></body></html>