somewhere in program:
...
SETB EX0     ; enable external interrupt 0
SETB EA
MOV PCON,#1  ; power-down mode: wait till external event
....