Dodatna neobvezna domača naloga - Optional Homework

Rok za oddajo: nedelja, 16. januar 2022, 23.55

Dodatna naloga (+10 točk pri preverjanjih, samo, če ste že v osnovi zbrali 150 točk)

V zbirniku za procesor ARM napišite program, ki števila v tabeli TABELA uredi po velikosti od najmanjšega do največjega. Uporabite enega izmed preprostih algoritmov za urejanje (urejanje z mehurčki, urejanje z vstavljanjem, urejanje z izbiranjem).

Napišite kratko dokumentacijo. Opišite kako vaš algoritem deluje. Napišite, katere registre ste uporabili in čemu služijo (bazni register, register za podatke, števec, ...). Vse skupaj naj bo največ ena stran A4. Program in dokumentacijo oddajte v eni zip datoteki preko spletne učilnice. Na zagovor prinesite natisnjeno dokumentacijo.


Additional task (+10 points on points from lab tests, but only above collected 150 points)

Write a program in assembler for the ARM processor, that will sort numbers in the table TABELA by value, from smallest to largest. Use one of the simple sorting algorithms (bubble sort, selection sort, ...).

Write short documentation. Briefly describe how your algorithm works. Describe the usage of registers and their meaning or role (base register, data register, counter, ...). All this should fit on one A4 page. Submit program and document in one zip file to the online classroom. After submission, you have to pass oral defense of your report - bring printed documentation with you.


Ogrodje programa ("Program Framework"):

              .text

TABELA: .hword 1, 5, -1, 8, -130, 1024, 10, 64, -80, 256

VELIKOST_TABELE: .byte 10

              .align

              .global __start

__start:

             @Tu napisi program

__end:    b __end