ARM ASM PROGRAM FOR FINDING FACTORIAL OF A NUMBER-1
AREA prog,code,readonly
EntRYldrb r0,num
mov r3,r0
up sub r1,r3,#1
mul r2,r0,r1
mov r0,r2
mov r3,r1
cmp r3,#1
bhi up
ldr r0,=fact
str r2,[r0]
s b s
AREA data2,data,readonly
num DCB 0x3
AREA data1,data
fact SPACE 5
END
Comments
Post a Comment