AVR Assembly Language

2007-05-28 3:09 am
Anyone knows how to write the bubblesort algorithm in AVR Assembly Language?

Here's the algorithm:
for i := 1 to n
for j := n to i+1
if A[ j ] < A[ j-1 ]
then exchange A[ j ] <-> A[ j-1 ]

where n will be 0< n <250 unsigned 8-bit
A is given in an input file where the first element is going to be the number of elements to be sorted and followed by the elements.

The code MUST be in AVR assembly language.
Thanks.

回答 (1)

2007-05-28 7:57 am
✔ 最佳答案
以下連結或許幫到閣下,





圖片參考:http://www.atmel.com/dyn/images/products/Icon_Acrobat.gif


圖片參考:http://www.atmel.com/dyn/images/products/Icon_Disk.gif


AVR220: Bubble Sort (5 pages, revision B, updated 5/02)
This Application Note implements the Bubble Sort algorithm on the AVR controllers.


收錄日期: 2021-04-19 21:40:33
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070527000051KK04357

檢視 Wayback Machine 備份