   clr   ea   ;disable all interrupt (better maybe  mov ie,#0)
   call  RetiSub   ;release internal interrupt-in-progress flag
   call  RetiSub   ;and again to clear also high-level interrupts
;add more call RetiSub 
; if more than 2 interrupt levels are available (e.g. in RD2s)
   jmp   0   ;restart 
;restart contains explicit reset of stack pointer, 
; so no other stack housekeeping is needed
RetiSub:
   reti