w1.2: working on assignment1.2

This commit is contained in:
2024-09-14 23:06:14 +02:00
parent 5e4222e130
commit c16015123a
2 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
.cpu cortex-m4
.thumb
.syntax unified
.globl multiply
.text
.thumb_func
multiply:
MOVS.N R2, #0
ADDS.N R1, #0
BEQ.N =exit
loop:
ADDS.N R2, R0, R2
SUBS.N R1, #1
BNE.N =exit
B.N =loop
exit:
MOVS.N R0, R2
BX.N LR