ra/naloga_08/vaja_01.s
Gašper Dobrovoljc 5aee58cb4a
naloga_8
2023-12-12 17:19:11 +01:00

33 lines
314 B
ArmAsm

.text
.org 0x20
stev1: .space 4
stev2: .word 123
stev3: .word 456
.global _start
_start:
@ stev2 -> r2
adr r0, stev2
ldr r2, [r0]
@ stev3 -> r3
adr r0, stev3
ldr r3, [r0]
@ r2 = r3
mov r2, r3
@ r2 > r3
cmp r2, r3
bhi dalje
mov r1, r3
dalje:
@ r1 -> stev1
adr r0, stev1
str r1, [r0]