The program is very simple, did you write this code?
This code detects external hardware interrupt 0 the code in the function "void external0(void) interrupt 0" is an interrupt routine,
and
the code in the function main "void main()" is for setting up the interrupt
The code deals with external interrupt0 of 8051(ATMEL 89C51). The code in void main() function are the settings required in order to set the external interrupt & the interrupt sub routine deals with what happens if an external interrupt occurs.
Regards,
Jerin.:wink: