;
;
;                    wr_lbn.txt
;
;    
;
;  
; "   LB2"
; 
; "   LB1"
;
;      PGX051
;  
; wr_lb1.hex -   "   LB1"
; 
; wr_lb2.hex -   "   LB2"
; 
;
;------------------------------------------------------------
;
;  "   LB2"
;   #cmd_wr_lb2 (upgm_m0.txt)
;      #cmd_wr_lb1,   
;  combus_5=combus_7=0
;
 wr_lb2:
     orl P1,#1<<combas_3
     anl P1,#low ~(1<<combus_5 || 1<<combus_7)
		      ;  combas_3=1, combus_5=combus_7=0 
		      ; * c51asm   "~"   *
     sjmp owr_lbn
;
;------------------------------------------------------------
;
;  "   LB1"
;   #cmd_wr_lb1 (upgm_m0.txt)
;
 wr_lb1:
     orl P1,#(1<<combas_3 || 1<<combus_5 || 1<<combus_7)
		      ;  combas_3=1, combus_5=combus_7=1 
  owr_lbn:
     ELL_ON
     LLPRINT reinfo ;    
     setb data_key ;   data_key=1
     mov data_t,#cmd_wr_lb1 ;     R7
     acall pspi_txd ;  
     acall pspi_rxd ;   
     LLPRINT str3 ;"is it successfully executed"
		        ;     
		 orl P1,#(1<<combas_3 || 1<<combus_5 || 1<<combus_7)
				 ;  combas_3=combus_5=combus_7=1
    ELL_OFF ;
   mov a,#0xA5
   cjne a,data_t,wr_lb_er ;     
   ajmp res_user ;       
 wr_lb_er:
   LLPRINT str2 ; "FATAL ERROR"
   ajmp res_user ;       
;