ARM集成环境中求19!的程序
; |
02 |
; 求 19! |
03 |
; |
04 |
|
05 |
AREA jcCode, CODE, READONLY |
06 |
ENTRY |
07 |
start |
08 |
|
09 |
mov r0, #1 ;结果低32位 |
10 |
mov r1, #0 ;结果高32 |
11 |
mov r2, #19 ;循环计数器 |
12 |
|
13 |
jcloop |
14 |
umull r0, r3, r2, r0; [r3 r0] <- r0 * r2 |
15 |
mla r1, r2, r1, r3; r1 <- r1 * r2 + r3 |
16 |
subs r2, r2, #1 |
17 |
bne jcloop |
18 |
|
19 |
|
20 |
stop |
21 |
mov r0, #0x18 |
22 |
ldr r1, =0x20026 |
23 |
swi 0x123456 |
24 |
|
25 |
end |
26 |
|
有梦想就不会觉得苦.
Do you know what is the glittering life?