rizwanspirit
Member level 4
I need assembly code for 1sec delay for 8051.i made this code in keil but this
is not executed.
And gives an error
error A21: EXPRESSION WITH FORWARD REFERENCE NOT PERMITTED
My program is
ORG O0H
MOV A,#55H
AGAIN1:
MOV P1,A
LCALL DELAY
CPL A
SJMP AGAIN1
ORG 30H
DELAY:
MOV R1,#250
AGAIN:
MOV R2,#250
HERE:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
DJNZ R2,HERE
DJNZ R1,AGAIN
RET
END
is not executed.
And gives an error
error A21: EXPRESSION WITH FORWARD REFERENCE NOT PERMITTED
My program is
ORG O0H
MOV A,#55H
AGAIN1:
MOV P1,A
LCALL DELAY
CPL A
SJMP AGAIN1
ORG 30H
DELAY:
MOV R1,#250
AGAIN:
MOV R2,#250
HERE:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
DJNZ R2,HERE
DJNZ R1,AGAIN
RET
END