;
;
;                    rd_dump.txt
;
;    
;
;
;  "     " 
;      
; max_ptrh:max_ptrl  
;
;   ZIF-  
; combus_7=combus_5=1 combas_3=0  PGX051
; combus_4=0  PAVR
;
;   PGX051    (data_key=0)
;     data_key=1  ,
;        
; (  max_ptrh:max_ptrl = GPIOR0.pcnt_set =0)
;
;     "" -  
; 0x1000 - 0x1FFF   0x0000-0x0FFF
;      
;     0xFF  
;
;      PGX051
;   rd_dump.hex
;
;------------------------------------------------------------
;
;  "     "
;   #cmd_rd_data (upgm_m0.txt)
;
 rd_dumpw:
    anl P1,#low ~(1<<combas_3)
     orl P1,#(1<<combus_5 || 1<<combus_7)
		      ;  combas_3=0, combus_5=combus_7=1 
		 clr a
		 mov pcntl,a
		 mov pcnth,a ;   
		 clr arrey_end ;   arrey_end=0
		 mov dptr,#rd_dump ;    
     ELL_ON
     LLPRINT reinfo ;    
     setb data_key ;   data_key=1
     mov data_t,#cmd_rd_data ;     R7
     acall pspi_txd ;  
     clr data_key ;  data_key=0
     acall pspi_rxd ;     
     jnb data_key,norm_end2
     ELL_OFF ;   -   
            ;  
     LLPRINT str4 ; "load maximum address of the
	             ; array ROM and repeat command"
    ajmp res_user ;       
 norm_end1:
        acall pspi_rxd
 norm_end2:
         mov a,data_t
         movx @dptr,a ;     
         inc dptr ;  +1
     mov a,max_ptrl ;      
     cjne a,pcntl,work_pirat ;   max_ptrh:max_ptrl
     mov a,max_ptrh ;    pcnth:pcntl
     cjne a,pcnth,work_pirat
     setb arrey_end ;   arrey_end=1
    LLPRINT irdms ;    
     ELL_OFF
   ajmp res_user ;       
;
 work_pirat:
       mov a,#1 ;     -  pcnth:pcntl
       add a,pcntl
       jnc noinc
       inc pcnth
 noinc:
      mov pcntl,a
     sjmp norm_end1 ;    norm_end1
;
 irdms:
  .db "\r\ndump ROM is copied in area of the upper drive RAM\r\n",0
;