GNU汇编语法:
a: .word 1
b: .word 2
c: .word 3
x: .word
y: .word
prog:
ldr r0, =a
ldr r1, [r0]
ldr r0, =b
ldr r2, [r0]
ldr r0, =c
ldr r3, [r0]
cmp r1, r2
bge true
sub r1, r1, r3
mul r1, r1, r2
ldr r0, =y
b end
true:
mov r4, #8
add r1, r1, r2
mul r1, r1, r4
ldr r0, =x
end:
str r1, [r0]