;
;         "hs_ext_disp.txt"     
;
   .org (irq_res+int_vectors_size) ;    
init:                    ;   
	  ldi tmp0,0x80
    out acsr,tmp0  ;   (sbi acsr,acd)
    out CLKPR,tmp0 ;    
    clr tmp0 ;  1:1 ( 1:8 " ")
    out CLKPR,tmp0 ;   = 0,000000125S/
     ;    , -   
   ;out mcucr,tmp0 ;   
   ldi tmp0,low(RAMEND)
   out spl,tmp0 ;   
; (    spl  low (RAMEND)    )
;       
   rcall WDT_off ;   WDT
;
;  dp_seg_port =   ,   =1
;   = 0()
;  dp_a_port     ,    
; ,   =0   = b'n1111nnn'()
;
dp_hs_init:
  clr tmp0
  out dp_seg_port,tmp0 ; PORTB
  ser tmp0
  out dp_anod_port,tmp0 ; PORTD
  out DDRB,tmp0 ;     ,    =0 ()
;  DDRD   PORTD   
;   
; PORTD.0 , PORTD.1 
  out DDRD,tmp0
  cbi DDRD,t_mk_RxD ; t_mk_RxD      "" 
;
; - /1
;  " "     ICP1   
;   OC1B,        1:8
;    ICF1(OVF1), OCF1A, OCF1B ( 
;       )
;
 ldi tmp0,high (dp_rastr)
 out ICR1H,tmp0
 ldi tmp0,low (dp_rastr)
 out ICR1L,tmp0
 ldi tmp0,high (dp_pgk)
 out OCR1AH,tmp0
 ldi tmp0,low (dp_pgk)
 out OCR1AL,tmp0
 ldi tmp0,high (dp_maxj)
 out OCR1BH,tmp0
 ldi tmp0,low (dp_maxj)
 out OCR1BL,tmp0
; !!!    ICR1, OCR1A  OCR1B 
;   ,    
;  WGM13:WGM12:WGM11:WGM10 !!!
 ldi tmp0,(1<<WGM11)
 out TCCR1A,tmp0
 ldi tmp0,(1<<WGM13 | 1<<WGM12)
 out TCCR1B,tmp0
 in tmp0,TIMSK
 andi tmp0,0b00000111 ;   T/0  
 ori tmp0,(1<<ICIE1 | 1<<OCIE1B | 1<<OCIE1A)
 out TIMSK,tmp0
;
;    
   ldi tmp0,103
   out UBRRL,tmp0
   ldi tmp0,(1<<RXCIE | 1<<TXCIE)
   out UCSRB,tmp0
   ldi tmp0,(1<<USBS | 1<<UCSZ1 | 1<<UCSZ0)
   out UCSRC,tmp0
;