This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Spot the errors.

Hey guys. I'm just learning the basis of embedded with Keil. I'm working on the 8051.
Doing this program to find the factorial of a number. Got the code online and I can't understand why it won't run. Help me out, guys.

1.ORG 0000H
2.MOV R0, #05H
3.MOV A, R0
4.ACALL FACT
5.FACT: DEC R0
6.     CJNE R0, #1, REL
7.     SJMP STOP
8.REL: MOV B,R0
9.    MUL AB
10.    ACALL FACT
11.STOP: END
12.END


I added the last END after it showed a warning about missing END statement. I get the following errors/warnings:
Q3.s(0): error A21: EXPRESSION WITH FORWARD REFERENCE NOT PERMITTED
Q3.s(11) SYNTAX ERROR
Target not created.

Parents Reply Children
No data