<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2900.5764" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>PIC18 STD</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>volatile unsigned char Pole[32] = 
{<BR>&nbsp;0,1,2,3,4,5,6,7,8,9,&nbsp;<BR>&nbsp;0,1,2,3,4,5,6,7,8,9,&nbsp;<BR>&nbsp;0,1,2,3,4,5,6,7,8,9,&nbsp;<BR>&nbsp;0,1&nbsp;<BR>};<BR>unsigned 
char Soucet;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><FONT face=Arial size=2>
<DIV><BR>void main(void) {<BR>&nbsp;<BR>&nbsp;auto unsigned char 
Ukazatel;<BR>&nbsp;<BR>&nbsp;for ( Ukazatel = 0; Ukazatel &lt; 32; ++Ukazatel) 
{<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Soucet += 
Pole[Ukazatel];<BR>&nbsp;}&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>}<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>;Soucet.c: 18: Soucet += 
Pole[Ukazatel];<BR>&nbsp;&nbsp; 182&nbsp; 00FFBA&nbsp; 
50D9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;movf&nbsp;fsr2l,w,c<BR>&nbsp;&nbsp; 183&nbsp; 00FFBC&nbsp; EE0F&nbsp; 
F01F&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;lfsr&nbsp;0,_Pole<BR>&nbsp;&nbsp; 184&nbsp; 00FFC0&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FB8&nbsp;&nbsp;&nbsp; D002&nbsp;&nbsp;&nbsp;&nbsp; BRA 
0xffbe<BR>&nbsp; FFBA&nbsp;&nbsp;&nbsp; EF00&nbsp;&nbsp;&nbsp;&nbsp; GOTO 
0<BR>&nbsp; FFBC&nbsp;&nbsp;&nbsp; F000&nbsp;&nbsp;&nbsp;&nbsp; NOP<BR>&nbsp; 
FFD2&nbsp;&nbsp;&nbsp; 010F&nbsp;&nbsp;&nbsp;&nbsp; MOVLB 
0xf<BR>17:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;<BR>18:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;Soucet += Pole[Ukazatel];<BR>&nbsp; FFBE&nbsp;&nbsp;&nbsp; 
CF3F&nbsp;&nbsp;&nbsp;&nbsp; MOVFF 0xf3f, 0xfe8<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>A ted napsano v asembleru:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; movlw&nbsp;&nbsp;&nbsp; 
32</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; movwf&nbsp;&nbsp;&nbsp; 
Pocet_Byte</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; lfsr&nbsp;0,Pole</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; clrf&nbsp;&nbsp;&nbsp; 
WREG</FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" 
size=3>Pocitej_Soucet</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" 
size=3>&nbsp;&nbsp;&nbsp; addwf POSTINC0,W<BR>&nbsp;&nbsp;&nbsp; 
decfsz&nbsp;Pocet_Byre<BR>&nbsp;&nbsp;&nbsp; bra 
Pocitej_Soucet</FONT><BR></DIV></FONT>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=konfera@efton.sk href="mailto:konfera@efton.sk">Jan Waclawek</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=hw-list@list.hw.cz 
  href="mailto:hw-list@list.hw.cz">HW-news</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, May 22, 2009 10:20 AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: C nebo ASM?</DIV>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>Co je to 
  "toto"?<BR><BR>Poslite KOMPLETNY program, ak chcete 
  porovnavat.<BR><BR>wek<BR><BR><BR>----- Original Message 
  ---------------<BR>&gt;Vlastni vinou? Ja nejsem nespokojeny s C. Vm ze ne vse 
  dokaze C =<BR>&gt;optimalizovat.&nbsp; Jen jsem si chtel na tomto prikladu 
  porovnat ruzne =<BR>&gt;platformy, PC, kompilatory.<BR>&gt;Znovu opakuji 
  otazku: "Dokaze jiny kompilator toto lepe 
  optimalizovat?"<BR><BR>_______________________________________________<BR>HW-list 
  mailing list&nbsp; -&nbsp; sponsored by <A 
  href="http://www.HW.cz">www.HW.cz</A><BR><A 
  href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</A><BR><A 
  href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</A><BR></BLOCKQUOTE></BODY></HTML>