;
;         "mac_b52m.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
;
 LPRINT macro adtrs
   mov strg_ptr,#low adtrs
   mov strg_ptr+1,#high adtrs
   acall proc_txd_init
 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
;
 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
;
;----------------------------------------------
;
 ASCII_LO macro
    acall asc_bin ;;   extihldd_4.txt
    orl a,h_tetras ;;        
 endm
;
;----------------------------------------------
;
 ASCII_HI macro
    acall asc_bin ;;   extihldd_4.txt
    swap a
    mov h_tetras,a ;      (r2)
 endm
;
;----------------------------------------------
;
;      
;
 TR_BYTE macro data_t
   local wttx
   clr ES
   mov sbuf,data_t
 wttx:
   jnb TI, wttx
   clr TI
   setb ES
 endm
;
;----------------------------------------------
;

;
;----------------------------------------------
;