<br>Neznám detailně AVR ale snad takto :<br><br><a name="CpCpc">Now we compare a 16-bit-word in R1:R2 with the one in R3:R4 to evaluate
whether it is bigger than the second one. Instead of <i>SUB</i> we use the compare
instruction <i>CP</i>, instead of <i>SBC</i> we use <i>CPC</i>:</a><br><br>
<b> CP R2,R4</b> ; compare lower bytes<br>
<b> CPC R1,R3</b> ; compare upper bytes<br><br>
If the carry flag is set now, R1:R2 is bigger than R3:R4.<br><br>viz <a href="http://www.avr-asm-tutorial.net/avr_en/beginner/index.html">http://www.avr-asm-tutorial.net/avr_en/beginner/index.html</a><br><br><br><div><span class="gmail_quote">
31.3.07, <b class="gmail_sendername">Jiří Kouřil</b> <<a href="mailto:weg@centrum.cz">weg@centrum.cz</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Dobrý den</font></div>
<div><font face="Arial" size="2">Potřeboval bych poradit jak provést v assembleru
operaci zjistění jestli operand A je větší než operand B.</font></div>
<div><font face="Arial" size="2">Potřebuju to napasovat do mikrokontroleru AVR
ATmega2560.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Děkuji Jirka</font></div></div>
<br>_______________________________________________<br>HW-list mailing list - sponsored by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.HW.cz" target="_blank">www.HW.cz</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Hw-list@list.hw.cz">
Hw-list@list.hw.cz</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://list.hw.cz/mailman/listinfo/hw-list" target="_blank">http://list.hw.cz/mailman/listinfo/hw-list</a><br><br></blockquote></div>
<br><br clear="all"><br>-- <br>Zdravi<br>Jirka MWW