AREA factorial,CODE ENTRY ;program to find factorial MOV R0,#1 ;int c =1 MOV R1,#6 ;int n=1 MOV R3,#1 ;int fact=6 BL loop B out loop ;what is the error MUL R4,R3,R0 ADD R0,R0,#1 CMP R0,R1 BLE loop MOV PC,LR END
loop ;what is the error
loop: ;what is the error
AREA factorial,CODE ENTRY ;program to find factorial MOV R0,#1 ;int c =1 MOV R1,#6 ;int n=1 MOV R3,#1 ;int fact=6 BL loop B STOP loop MUL R4,R3,R0 MOV R3,R4 ADD R0,R0,#1 CMP R0,R1 BLE loop MOV PC,LR STOP B STOP ;R4 IS FINAL ANSWER END
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)