I'm using keil uvision 4 and learning programming for AT89s52 , I'm using 12MHZ frequency.
I have written a subroutine for a delay of 10 micro sec which is in another file called DELAY.ASM and made a call from DELAYCALL.ASM to it, but the call results in an infinite loop.I just dont have a clue why this behaviour, please help?clarify this phenomenon
DELAY.ASM
DELAYS_A SEGMENT CODE RSEG DELAYS_A
DELAY10MICROSEC: NOP NOP NOP NOP NOP NOP NOP NOP RET
DELAYCALL.ASM
$INCLUDE(DELAY.ASM)
CSEG AT 0
ACALL DELAY10MICROSEC
END
i tried simulation,found that statement END is never reached
"found that statement END is never reached"
so you found one thing that didn't happen.
What things did happen?
ACALL DELAY10MICROSEC calls itself again and again ,that happens ,and i can find that.but the code was not intended to do that
Why didn't you continue in this thread, instead of starting a new one:
http://www.keil.com/forum/22212
but the code was not intended to do that
And how did you tell the code what you intended to happen instead? In other words, what did you believe the subroutine would be returning to, and what was going to happen there?
see http://www.keil.com/forum/22212/