Dodatne naloge za utrjevanje
1. Napišite zaporedje ukazov v zbirniku za procesor ARM, ki 32-bitno spremenljivko STEV1 poveča za 5-krat brez uporabe ukaza za množenje. Nalogo rešite s posrednim naslavljanjem brez odmika preko registra R0.
NAMIG: število množite s 5 tako, da ga 5-krat seštejete.
2. Rezervirajte prostor za tabelo z oznako TABELA, v kateri je prostora za 4 32-bitne vrednosti. Nato v te 4 operande zapišite njihove pomnilniške naslove. Nalogo rešite s posrednim naslavljanjem s takojšnjim odmikom preko registra R0.
3. Napišite zaporedje ukazov v zbirniku za procesor ARM, ki sešteje 5 16-bitnih vrednosti: »1,2,3,4,5«, ki so definirana z oznako TABLE, rezultat pa shrani v 32-bitno spremenljivko SUM. Nalogo rešite s posrednim naslavljanjem s takojšnjim odmikom preko registra R0.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Write the sequence of instructions in the ARM assembly language that increments the 32-bit STEV1 variable 5 times without the use of multiplication command. Solve the task by indirect base addressing without immediate offset through the register R0.
TIP: multiplying the number by 5 is the same as 5 additions.
2. Reserve the space for a table labeled TABLE with enough space for 4 32-bit values. Then write in TABLE the memory addresses of these 4 operands. Resolve the task by indirect addressing with immediate offset through the register R0.
3. Write the sequence of instructions in the ARM assembly language, which sums up the 5 16-bit values defined with the label TABLE: "1,2,3,4,5" and stores the result in a 32-bit variable SUM. Resolve the task by indirect addressing with immediate offset through the register R0.