is it required that the last instruction of a C51 program be something like this.
LABEL:SJMP LABEL
Ali Akbar
Depends. Few programs has a busy-loop at the end of the code. Most programs have a big loop that runs forwever, checkif for any serial data, keypresses etc.
An embedded application are not expected to end - there are no OS that will "return to the command line" when an application ends.
As Per Westermark writes, you need some type of forever loop. By default, Keil adds a LJMP to main or they did in the past. You may have code that location that you don't want to to re-run. So you had better decide where you want your code to loop. Bradford