Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
    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
Posted

VB
loop                                         ;what is the error


try 1) (note the colon)

loop:                                         ;what is the error


2) RTFM !!!!
 
Share this answer
 
CSS
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
 
Share this answer
 
Comments
CHill60 4-Jun-15 18:05pm    
You've actually duplicated the original error ... missing colon :

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900