;
;
;               kot_ios_mb.txt
;          
;       
;
;       
;       
;    ,  
;  / kotios,    
;  
;
;
     .cseg at com_string
 vector:
    ljmp start_system ;   
  ;  
  ;   start_system   
  ;    b52m1 
  ;       
  ;     
  ;  vector (    
  ;  kot_ios_f)   :
  ;      
	;    ,
  ;     
  ;        
  ;  ljmp res_user (    
  ;   )
  ;
      .cseg at (vector + 16)
 reinfo:
  .db "\r\nPG4012 platfoma"
  .db "\r\n(KOTUINO mode 2 bios (b52m1 v0.1)"
  .db "in Resident Memory of the Programs\r\n"
	.db "and mbt v0.2 "
	.db "in External Memory of the Programs)\r\n",0
  ; " /  "     250 ,
  ;    ASCII,   ()
  ;   0x00     256  !!!
	;      kotios
	;  reinfo (0xFC10)  start_system-1 (0xFD0F)
  ;
    .cseg at (reinfo + 256)
 start_system:
        LLPRINT str0 ;   - 
;-------------------------------------------
;  ( )
;     
;    
; start_user
 res_user:
       mov DPTR,#com_string
       mov a,#0x02
       movx @dptr,a
       mov a,#high start_user
       inc dptr
       movx @dptr,a
			 mov a,#low start_user
       inc dptr
       movx @dptr,a ;   (ljmp start_system)
       ;   com_string   ljmp start_user
       ;       
			 ;   ,   ,
			 ;        
			 ;    (ldu_ios.txt)
;
;------------------------------------------------------------
;
;     
;     ,
;   ,
;   com_string+1:com_string+2
 start_user:
        ELL_ON
        WAITT 50
        LLPRINT str1 ;  
        ; "expect boot the command file"
        ; ("   ")
        ELL_OFF
;
;----------------------------------------------
;
;   *.hex    
;    /  
;  N      
;  b52m & kotios (AT89S52)  
;  0x0000 - 0x1FFF -    
;  0x2000 - 0xFBFF -   
;           /
;  0xFC00 - 0xFEFF -   kotios
;  0xFF00 - 0xFFEF -   
;             
;  0xFFF0 - 0xFFFF -    
;           KEY_EA - " +"/ 
;
 echo_rst:
  lcall bottle 
;----------------------------------------------
;
;      \
;  
;    ap_fill=0     \
;                        
;    glob_er=?    " "
;    eof_ldr=1/?     "  "
;
;    
;  boot_addr+1:boot_addr
;
;----------------------------------------------
;   
     lcall proc_txd_init ;    
        ;     
        ; m_bottle     bios
      WAIT_TOF ;     
      jbc eof_ldr,work_start ;     work_start
      clr glob_er ;    (    )
     ajmp echo_rst ;    echo_rst (  )
;--------------------------------------
 work_start:
   ajmp com_string ;      
       ; com_string 
       ; (     bottle 
       ; boot_addr+1:boot_addr -  
			 ;     b52m)
       ;      ajmp/ljmp 
       ;  mov DPTR,#addr   
       ;   -
       ;     
;
;----------------------------------------------
;
 terus:
    setb P3.KEY_EA ;    
    nop ;   
    nop
    setb EA ; EI  
    LLPRINT reinfo ; (str0)   - 
  ret
;--------------------------------------
;      
; 
;     res_user (ajmp/ljmp res_user)
;
;----------------------------------------------
;
;
;    
;     b52m1
; ( IRQ 
;   trs_ir  intwork_b52m.txt
;        b52m1)
;
;  -   
; RI     
;  tmp_rx,   RI
;      ,
;     
;   step_ptr+1:step_ptr
; (    
;     
;   step_ptr=L,step_ptr+1=H )
;    tmp_rx 
;  RET.
;     
;      RI
;
;  
;tmp_rx
;step_ptr
;step_ptr+1
;     kotios
; - skt1
;