;
;         "mac_ios_mb.txt" ;    ()
;
;
;----------------------------------------------
;
  SEL_RB macro num ;;    
   if num = 0
    clr RS0
    clr RS1
   elseif num = 1
    setb RS0
    clr RS1
   elseif num = 2
    clr RS0
    setb RS1
   elseif num = 3
    setb RS0
    setb RS1
  endif
 endm
;
;----------------------------------------------
;
;     
;  
; adtrs -      
;   250  +   0x00
;
;  LLPRINT    "" 
;   bios (b52b bios_2 )
;      
; ( - WAIT_TOF)
;
 LLPRINT macro adtrs
  local ptt
   mov strg_ptr,#low adtrs
   mov strg_ptr+1,#high adtrs
   lcall proc_txd_init
 ptt:
   jnb eof_txd,ptt
 endm
;
;----------------------------------------------
;
;     
;    
 PRETEX macro adt
  local rips
    clr REN ;;  
  rips:
    jnb TI,rips
    clr TI ;;   
    mov strg_ptr,#low adt
   mov strg_ptr+1,#high adt
 endm
;
;
;----------------------------------------------
;
 ELL_ON macro
   clr P3.LED_EL
 endm
;
;----------------------------------------------
;
 ELL_OFF macro
   setb P3.LED_EL
 endm
;
;----------------------------------------------
;
; 1 tm = 0,01S  1    255!
;
 WAITT macro tm
  local llp
   mov wtm1,#tm
   setb en_wtm1
 llp:
   jnb wtm1_tic,llp
   clr en_wtm1
   clr wtm1_tic
 endm
;
;----------------------------------------------
;
 WAIT_TOF macro
  local ptt
 ptt:
   jnb eof_txd,ptt
 endm
;
;----------------------------------------------
;
 TEST_STOP macro
  sjmp $
 endm
;
;----------------------------------------------
;
;      
;
 TR_BYTE macro data_t
   local wttx
   clr ES
   mov sbuf,data_t
 wttx:
   jnb TI, wttx
   clr TI
   setb ES
 endm
;
;----------------------------------------------
;
;     b52m 
;  kotios    
;      
;
;   adr_dest  :
;
;         start_user
;
;        -    
;   
;   "expect boot the command file"
; ("   ")
;     
;   com_string+1:com_string+2
;
;          res_user
;
;        -    
;   
;   "expect boot the command file"
; ("   ")
;     
;   start_user =   
;  kotios1
;
;          echo_rst
;
;        -     
;  hex 
;    
;   , 
;   com_string+1:com_string+2
;
;
;
;
;
;
 PJMP_ret macro adr_dest, adr_ret
  mov dptr,#com_string+1
  mov a,#high adr_ret
  movx @dptr,a
  inc dptr
  mov a,#low adr_ret
  movx @dptr,a
  ljmp adr_dest
 endm
;
;----------------------------------------------
;
;
;----------------------------------------------
;