;--------------------------------------------------------------------------
;	Program written for Receiver.
;	Written By: Muhammad Kamran,
;	Department of Electronics, University of Peshawar.
;--------------------------------------------------------------------------                
       
	     org 00h
	     acall initserial
	     mov p1,#00h
      wait:  jnb ri,wait
             clr Ri
             mov a,sbuf
      bulb:  cjne a,#40h,fan
             cpl p1.2
             ajmp wait
      fan:   cjne a,#50h,motor
             cpl p1.3
             ajmp wait
      motor: cjne a,#60h,tv
             cpl p1.4
             ajmp wait
      tv:    cjne a,#70h,wait
             cpl p1.5
             ajmp wait
;-----------------------------------------------------------------------
 initserial: mov scon,#50h
             mov tmod,#20h
             mov th1,#-96
             setb tr1
	     ret
;-----------------------------------------------------------------------
;		Delay Subroutine
;-----------------------------------------------------------------------
;     delay:	mov r0,#50h
 ;     delay1:	mov r1,#50h
  ;    repeat:	djnz r1,repeat
   ;   		djnz r0,delay1
;		ret
;---------------------------------------------------------------------
             end

