ra/naloga_08/vaja_03_a.s

33 lines
339 B
ArmAsm
Raw Permalink Normal View History

2023-12-12 16:19:11 +00:00
.text
.org 0x20
stev1: .space 4
stev2: .word 123
stev3: .word 456
.global _start
_start:
@ stev2 -> r2
adr r0, stev2
ldrs r2, [r0]
@ stev3 -> r3
adr r0, stev3
ldrs r3, [r0]
@ r2 = r3
mov r2, r3
@ r2 > r3
cmp r2, r3
bgt dalje
mov r1, r3
dalje:
@ r1 -> stev1
adr r0, stev1
str r1, [r0]